mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix https detection with reverse proxy (#2910)
This commit is contained in:
@@ -407,7 +407,7 @@ func BaseURLMiddleware(next http.Handler) http.Handler {
|
|||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
|
||||||
scheme := "http"
|
scheme := "http"
|
||||||
if r.TLS != nil {
|
if strings.Compare("https", r.URL.Scheme) == 0 || r.TLS != nil || r.Header.Get("X-Forwarded-Proto") == "https" {
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
}
|
}
|
||||||
prefix := getProxyPrefix(r.Header)
|
prefix := getProxyPrefix(r.Header)
|
||||||
|
|||||||
Reference in New Issue
Block a user