Skip to content

Commit

Permalink
fix: uses username instead of email to validate remote user proxy. see
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Dec 18, 2023
1 parent 5a44322 commit 0db179c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/auth/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewForwardProxyAuth() *proxyAuthContext {

func (p *proxyAuthContext) AuthMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Remote-Email") != "" {
if r.Header.Get("Remote-User") != "" {
user := newUser(r.Header.Get("Remote-User"), r.Header.Get("Remote-Email"), r.Header.Get("Remote-Name"))
ctx := context.WithValue(r.Context(), remoteUser, user)
next.ServeHTTP(w, r.WithContext(ctx))
Expand Down

0 comments on commit 0db179c

Please sign in to comment.