Get protocol correctly if using SSL direct to Mattermost (#6361)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8c8d9dbf8f
Коммит
535eb14eeb
@@ -138,7 +138,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"
|
||||
|
||||
Ссылка в новой задаче
Block a user