Skip to content

Commit

Permalink
Fixes #14 - X-Forwarded-For could be messed up
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmoraisjr committed May 10, 2017
1 parent cd17319 commit 1a17902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rootfs/haproxy.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ frontend httpfront
{{ if ne $cfg.Syslog "" }}
option httplog
{{ end }}
reqidel ^X-Forwarded-For:.*
option forwardfor
{{ range $server := $cfg.HTTPServers }}
{{ range $location := $server.Locations }}
Expand Down Expand Up @@ -132,6 +133,7 @@ frontend httpsfront-{{ $host }}
{{ if ne $cfg.Syslog "" }}
option httplog
{{ end }}
reqidel ^X-Forwarded-For:.*
option forwardfor
rspadd Strict-Transport-Security:\ max-age=15768000
{{ range $location := $server.Locations }}
Expand Down Expand Up @@ -173,6 +175,7 @@ frontend httpsfront-default-backend
{{ if ne $cfg.Syslog "" }}
option httplog
{{ end }}
reqidel ^X-Forwarded-For:.*
option forwardfor
rspadd Strict-Transport-Security:\ max-age=15768000
default_backend {{ $location.Backend }}
Expand Down

0 comments on commit 1a17902

Please sign in to comment.