mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Deprecate forwarded port (#2228)
This commit is contained in:
committed by
GitHub
parent
28c72d3ee3
commit
e1cf695b65
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user