Merge pull request #96 from jkaninda/develop

fix: fix host forwording
This commit is contained in:
2024-11-12 18:15:42 +01:00
committed by GitHub

View File

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