@@ -157,6 +157,8 @@ func newReverseProxy(target *url.URL, upstream options.Upstream, errorHandler Pr
157157 // Ensure we always pass the original request path
158158 setProxyDirector(proxy)
159159
160+ // TODO (@tuunit) - this should be inverted or get a better name in the future to set the upstream host header
161+ // only if PassHostHeader is explicitly set to true. Currently this would be a breaking change.
160162 if !ptr.Deref(upstream.PassHostHeader, options.DefaultUpstreamPassHostHeader) {
161163 setProxyUpstreamHostHeader(proxy, target)
162164 }
@@ -215,6 +217,8 @@ func newWebSocketReverseProxy(u *url.URL, skipTLSVerify *bool, passHostHeader *b
215217 // Apply the customized transport to our proxy before returning it
216218 wsProxy.Transport = transport
217219
220+ // TODO (@tuunit) - this should be inverted or get a better name in the future to set the upstream host header
221+ // only if PassHostHeader is explicitly set to true. Currently this would be a breaking change.
218222 // Set upstream host header if PassHostHeader is false (same as regular HTTP proxy)
219223 if !ptr.Deref(passHostHeader, options.DefaultUpstreamPassHostHeader) {
220224 setProxyUpstreamHostHeader(wsProxy, u)