Deprecate forwarded port (#2228)

This commit is contained in:
kermieisinthehouse
2022-01-10 15:09:14 -08:00
committed by GitHub
parent 28c72d3ee3
commit e1cf695b65

View File

@@ -384,13 +384,7 @@ func BaseURLMiddleware(next http.Handler) http.Handler {
}
prefix := getProxyPrefix(r.Header)
port := ""
forwardedPort := r.Header.Get("X-Forwarded-Port")
if forwardedPort != "" && forwardedPort != "80" && forwardedPort != "8080" && forwardedPort != "443" && !strings.Contains(r.Host, ":") {
port = ":" + forwardedPort
}
baseURL := scheme + "://" + r.Host + port + prefix
baseURL := scheme + "://" + r.Host + prefix
externalHost := config.GetInstance().GetExternalHost()
if externalHost != "" {