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