mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-06-19 22:58:30 +02:00
docs: add todo for revamping the usage / naming of PassHostHeader
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -157,6 +157,8 @@ func newReverseProxy(target *url.URL, upstream options.Upstream, errorHandler Pr
|
||||
// Ensure we always pass the original request path
|
||||
setProxyDirector(proxy)
|
||||
|
||||
// TODO (@tuunit) - this should be inverted or get a better name in the future to set the upstream host header
|
||||
// only if PassHostHeader is explicitly set to true. Currently this would be a breaking change.
|
||||
if !ptr.Deref(upstream.PassHostHeader, options.DefaultUpstreamPassHostHeader) {
|
||||
setProxyUpstreamHostHeader(proxy, target)
|
||||
}
|
||||
@@ -215,6 +217,8 @@ func newWebSocketReverseProxy(u *url.URL, skipTLSVerify *bool, passHostHeader *b
|
||||
// Apply the customized transport to our proxy before returning it
|
||||
wsProxy.Transport = transport
|
||||
|
||||
// TODO (@tuunit) - this should be inverted or get a better name in the future to set the upstream host header
|
||||
// only if PassHostHeader is explicitly set to true. Currently this would be a breaking change.
|
||||
// Set upstream host header if PassHostHeader is false (same as regular HTTP proxy)
|
||||
if !ptr.Deref(passHostHeader, options.DefaultUpstreamPassHostHeader) {
|
||||
setProxyUpstreamHostHeader(wsProxy, u)
|
||||
|
||||
Reference in New Issue
Block a user