diff --git a/rootfs/etc/haproxy/template/haproxy.tmpl b/rootfs/etc/haproxy/template/haproxy.tmpl index 6c49ba34b..7dfe569ff 100644 --- a/rootfs/etc/haproxy/template/haproxy.tmpl +++ b/rootfs/etc/haproxy/template/haproxy.tmpl @@ -258,6 +258,7 @@ frontend httpsfront-{{ $host }} http-request auth {{ if ne $realm "" }}realm "{{ $realm }}" {{ end }}if{{ $location.HAMatchPath }} !{ http_auth({{ $listName }}) } {{ end }} {{ end }} + http-request set-header X-Forwarded-Proto https {{ if ne $authSSLCert.CAFileName "" }} http-request set-header X-SSL-Client-SHA1 %{+Q}[ssl_c_sha1,hex] http-request set-header X-SSL-Client-DN %{+Q}[ssl_c_s_dn] @@ -269,7 +270,6 @@ frontend httpsfront-{{ $host }} {{ else if eq $cfg.Forwardfor "ifmissing" }} option forwardfor if-none {{ end }} - http-request set-header X-Forwarded-Proto https {{ if ne $authSSLCert.CAFileName "" }} {{ if eq $server.CertificateAuth.ErrorPage "" }} use_backend error495 if { ssl_c_ca_err gt 0 } || { ssl_c_err gt 0 }