File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,14 @@ func optionsCorsHandler() func(next http.Handler) http.Handler {
98
98
// The Session plugin is expected to be executed second, in order to skip authentication
99
99
// for users that have already signed in.
100
100
func buildAuthGroup () * auth_service.Group {
101
- group := auth_service .NewGroup (
102
- & auth_service.OAuth2 {}, // FIXME: this should be removed and only applied in download and oauth related routers
103
- & auth_service.Basic {}, // FIXME: this should be removed and only applied in download and git/lfs routers
104
- & auth_service.Session {},
105
- )
101
+ group := auth_service .NewGroup ()
102
+ group .Add (& auth_service.OAuth2 {}) // FIXME: this should be removed and only applied in download and oauth related routers
103
+ group .Add (& auth_service.Basic {}) // FIXME: this should be removed and only applied in download and git/lfs routers
104
+
106
105
if setting .Service .EnableReverseProxyAuth {
107
- group .Add (& auth_service.ReverseProxy {})
106
+ group .Add (& auth_service.ReverseProxy {}) // reverseproxy should before Session, otherwise the header will be ignored if user has login
108
107
}
108
+ group .Add (& auth_service.Session {})
109
109
110
110
if setting .IsWindows && auth_model .IsSSPIEnabled (db .DefaultContext ) {
111
111
group .Add (& auth_service.SSPI {}) // it MUST be the last, see the comment of SSPI
You can’t perform that action at this time.
0 commit comments