Forward auth headers

This commit is contained in:
hwhelan-CB 2018-06-30 01:54:03 -04:00 committed by Traefiker Bot
parent df600d6f3c
commit f9b1106df2
6 changed files with 40 additions and 13 deletions

View file

@ -94,6 +94,10 @@ func Forward(config *types.Forward, w http.ResponseWriter, r *http.Request, next
return
}
for _, headerName := range config.AuthResponseHeaders {
r.Header.Set(headerName, forwardResponse.Header.Get(headerName))
}
r.RequestURI = r.URL.RequestURI()
next(w, r)
}