Fixed detection of HTTPS without a proxy (#6232)

This commit is contained in:
Harrison Healey
2017-04-26 10:12:32 +01:00
committed by George Goldberg
parent 691c181570
commit 93e3981de9
+1 -1
View File
@@ -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"