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