We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a2cf96 commit 3cfb6c9Copy full SHA for 3cfb6c9
pkg/middleware/authn.go
@@ -12,9 +12,9 @@ const xWebAuthUser = "X-WebAuth-User"
12
func AuthN(authenticator auth.Authenticator) Middleware {
13
return func(next http.Handler) http.Handler {
14
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
15
- w.Header().Del(xWebAuthUser)
+ r.Header.Del(xWebAuthUser)
16
if ok, username := authenticator.Validate(r); ok {
17
- w.Header().Set(xWebAuthUser, username)
+ r.Header.Set(xWebAuthUser, username)
18
next.ServeHTTP(w, r)
19
return
20
}
0 commit comments