Pārlūkot izejas kodu

Set X-Forwarded-Proto for SSL connections

master
Chris Smith 5 gadus atpakaļ
vecāks
revīzija
033de3b124
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1
    0
      templates/haproxy.cfg.tpl

+ 1
- 0
templates/haproxy.cfg.tpl Parādīt failu

@@ -23,6 +23,7 @@ frontend main
23 23
     bind    :80
24 24
     redirect scheme https code 301 if !{ ssl_fc }
25 25
     http-response set-header Strict-Transport-Security max-age=15768000
26
+    http-request set-header X-Forwarded-Proto https if { ssl_fc }
26 27
 {{- range .Hostnames }}
27 28
     use_backend {{ .Name | replace "." "_" }} if { hdr(host) -i {{ .Name }}
28 29
         {{- range $san, $_ := .Alternatives }} || hdr(host) -i {{ $san }} {{- end }} }

Notiek ielāde…
Atcelt
Saglabāt