mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 21:27:40 -05:00
Fixed detection of HTTPS without a proxy (#6232)
This commit is contained in:
committed by
George Goldberg
parent
691c181570
commit
93e3981de9
+1
-1
@@ -128,7 +128,7 @@ func DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId
|
||||
}
|
||||
|
||||
func GetProtocol(r *http.Request) string {
|
||||
if r.Header.Get(model.HEADER_FORWARDED_PROTO) == "https" {
|
||||
if r.Header.Get(model.HEADER_FORWARDED_PROTO) == "https" || r.TLS != nil {
|
||||
return "https"
|
||||
} else {
|
||||
return "http"
|
||||
|
||||
Reference in New Issue
Block a user