Skip to content

Commit 05e4f0e

Browse files
author
OpenShift Bot
authored
Merge pull request #12271 from Miciah/bz1385421-template-router-support-proxy-protocol
Merged by openshift-bot
2 parents 2dd7247 + 9db4fe7 commit 05e4f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

images/router/haproxy/conf/haproxy-config.template

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ listen stats :1936
9696

9797
{{ if .BindPorts }}
9898
frontend public
99-
bind :{{env "ROUTER_SERVICE_HTTP_PORT" "80"}}
99+
bind :{{env "ROUTER_SERVICE_HTTP_PORT" "80"}}{{ if matchPattern "true|TRUE" (env "ROUTER_USE_PROXY_PROTOCOL" "") }} accept-proxy{{ end }}
100100
mode http
101101
tcp-request inspect-delay 5s
102102
tcp-request content accept if HTTP
@@ -145,7 +145,7 @@ frontend public
145145
# determined by the next backend in the chain which may be an app backend (passthrough termination) or a backend
146146
# that terminates encryption in this router (edge)
147147
frontend public_ssl
148-
bind :{{env "ROUTER_SERVICE_HTTPS_PORT" "443"}}
148+
bind :{{env "ROUTER_SERVICE_HTTPS_PORT" "443"}}{{ if matchPattern "true|TRUE" (env "ROUTER_USE_PROXY_PROTOCOL" "") }} accept-proxy{{ end }}
149149
tcp-request inspect-delay 5s
150150
tcp-request content accept if { req_ssl_hello_type 1 }
151151

0 commit comments

Comments
 (0)