Skip to content

Commit

Permalink
Merge pull request #105 from fmartingr/backport_1803001
Browse files Browse the repository at this point in the history
Bug 1816540: [4.3] Backport "remove proto-version header field"
  • Loading branch information
openshift-merge-robot committed Jul 3, 2020
2 parents 26a7f4f + 0b6322e commit 32c8e8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions images/router/haproxy/conf/haproxy-config.template
Expand Up @@ -430,11 +430,11 @@ backend {{genBackendNamePrefix $cfg.TLSTermination}}:{{$cfgIdx}}
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Proto-Version h2 if { ssl_fc_alpn -i h2 }
# Forwarded header: quote IPv6 addresses and values that may be empty as per https://tools.ietf.org/html/rfc7239
{{- if matchPattern "(v4)?v6" $router_ip_v4_v6_mode }}
http-request add-header Forwarded for=\"[%[src]]\";host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)];proto-version=\"%[req.hdr(X-Forwarded-Proto-Version)]\"
# See the quoting rules in https://tools.ietf.org/html/rfc7239 for IPv6 addresses (v4 addresses get translated to v6 when in hybrid mode)
http-request add-header Forwarded for=\"[%[src]]\";host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)]
{{- else }}
http-request add-header Forwarded for=%[src];host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)];proto-version=\"%[req.hdr(X-Forwarded-Proto-Version)]\"
http-request add-header Forwarded for=%[src];host=%[req.hdr(host)];proto=%[req.hdr(X-Forwarded-Proto)]
{{- end }}

{{- if not (isTrue (index $cfg.Annotations "haproxy.router.openshift.io/disable_cookies")) }}
Expand Down

0 comments on commit 32c8e8d

Please sign in to comment.