Track the ReverseProxy option in the request Scope

This allows for proper handling of reverse proxy based headers throughout
the lifecycle of a request.
This commit is contained in:
Nick Meves
2021-01-16 13:55:48 -08:00
parent 8e02fac2cc
commit b625de9490
4 changed files with 29 additions and 17 deletions
+4
View File
@@ -8,6 +8,10 @@ import (
// The RequestScope is used to pass information between different middlewares
// within the chain.
type RequestScope struct {
// ReverseProxy tracks whether OAuth2-Proxy is operating in reverse proxy
// mode and if request `X-Forwarded-*` headers should be trusted
ReverseProxy bool
// Session details the authenticated users information (if it exists).
Session *sessions.SessionState