From 535eb14eeb344a64667ad18d514a93fa738b07b7 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 9 May 2017 16:01:16 -0400 Subject: [PATCH] Get protocol correctly if using SSL direct to Mattermost (#6361) --- app/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/login.go b/app/login.go index 4f92841404..2528f93670 100644 --- a/app/login.go +++ b/app/login.go @@ -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"