We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 341bf97 commit 8e313b6Copy full SHA for 8e313b6
1 file changed
cmd/proxy/actions/home.go
@@ -116,7 +116,7 @@ func proxyHomeHandler(c *config.Config) http.HandlerFunc {
116
117
// if the host does not have a scheme, add one based on the request
118
if !strings.HasPrefix(templateData["Host"], "http://") && !strings.HasPrefix(templateData["Host"], "https://") {
119
- if r.TLS != nil {
+ if r.TLS != nil || r.Header.Get("X-Forwarded-Proto") == "https" {
120
templateData["Host"] = "https://" + templateData["Host"]
121
} else {
122
templateData["Host"] = "http://" + templateData["Host"]
0 commit comments