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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 != "" {