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 @@ -100,14 +100,14 @@ func optionsCorsHandler() func(next http.Handler) http.Handler {
100
100
// The Session plugin is expected to be executed second, in order to skip authentication
101
101
// for users that have already signed in.
102
102
func buildAuthGroup () * auth_service.Group {
103
- group := auth_service .NewGroup (
104
- & auth_service.OAuth2 {}, // FIXME: this should be removed and only applied in download and oauth related routers
105
- & auth_service.Basic {}, // FIXME: this should be removed and only applied in download and git/lfs routers
106
- & auth_service.Session {},
107
- )
103
+ group := auth_service .NewGroup ()
104
+ group .Add (& auth_service.OAuth2 {}) // FIXME: this should be removed and only applied in download and oauth related routers
105
+ group .Add (& auth_service.Basic {}) // FIXME: this should be removed and only applied in download and git/lfs routers
106
+
108
107
if setting .Service .EnableReverseProxyAuth {
109
- group .Add (& auth_service.ReverseProxy {})
108
+ group .Add (& auth_service.ReverseProxy {}) // reverseproxy should before Session, otherwise the header will be ignored if user has login
110
109
}
110
+ group .Add (& auth_service.Session {})
111
111
112
112
if setting .IsWindows && auth_model .IsSSPIEnabled () {
113
113
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