fix: fix host forwrading

This commit is contained in:
Jonas Kaninda
2024-11-12 17:17:22 +01:00
parent 5d7ef1850f
commit 6b062be06a

View File

@@ -76,6 +76,7 @@ func (proxyRoute ProxyRoute) ProxyHandler() http.HandlerFunc {
r.Header.Set("X-Forwarded-Host", r.Header.Get("Host"))
r.Header.Set("X-Forwarded-For", getRealIP(r))
r.Header.Set("X-Real-IP", getRealIP(r))
r.Host = targetURL.Host
}
backendURL, _ := url.Parse(proxyRoute.destination)
if len(proxyRoute.backends) > 0 {