mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +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 := ""
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user