Include username in response header (for use by nginx auth_request)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f54f54e538
commit
e9019026ff
1
login.go
1
login.go
@ -57,6 +57,7 @@ func httpBasicAuth(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.WriteHeader(http.StatusUnauthorized)
|
w.WriteHeader(http.StatusUnauthorized)
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
} else {
|
} else {
|
||||||
|
w.Header().Set("X-Remote-User", user)
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
for _, v := range e.Values {
|
for _, v := range e.Values {
|
||||||
|
Loading…
Reference in New Issue
Block a user