mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Fix invalid baseurl if host header already contains port (#2005)
This commit is contained in:
@@ -352,7 +352,7 @@ func BaseURLMiddleware(next http.Handler) http.Handler {
|
|||||||
|
|
||||||
port := ""
|
port := ""
|
||||||
forwardedPort := r.Header.Get("X-Forwarded-Port")
|
forwardedPort := r.Header.Get("X-Forwarded-Port")
|
||||||
if forwardedPort != "" && forwardedPort != "80" && forwardedPort != "8080" {
|
if forwardedPort != "" && forwardedPort != "80" && forwardedPort != "8080" && forwardedPort != "443" && !strings.Contains(r.Host, ":") {
|
||||||
port = ":" + forwardedPort
|
port = ":" + forwardedPort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user