Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HAProxy Router: Add option to use PROXY protocol
Configure HAProxy to expect incoming connections to use the PROXY protocol
if the ROUTER_USE_PROXY_PROTOCOL environment variable is set to "true" or
"TRUE".

This commit fixes bug 1385421.

https://bugzilla.redhat.com/show_bug.cgi?id=1385421
  • Loading branch information
Miciah committed Dec 16, 2016
1 parent 039e433 commit 9db4fe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/router/haproxy/conf/haproxy-config.template
Expand Up @@ -96,7 +96,7 @@ listen stats :1936

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

Expand Down

0 comments on commit 9db4fe7

Please sign in to comment.