fix: fix host forwording

This commit is contained in:
Jonas Kaninda
2024-11-12 18:14:50 +01:00
parent 2fdc3c7baa
commit 8aedbbdb6c

View File

@@ -74,7 +74,7 @@ func (proxyRoute ProxyRoute) ProxyHandler() http.HandlerFunc {
r.Header.Set("X-Forwarded-For", getRealIP(r))
r.Header.Set("X-Real-IP", getRealIP(r))
// Update the headers to allow for SSL redirection
if !proxyRoute.disableHostFording {
if proxyRoute.disableHostFording {
r.URL.Scheme = targetURL.Scheme
r.Host = targetURL.Host
}