Skip to content

Commit

Permalink
Prevent duplicated X-Scheme headers in haproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
foosel committed Feb 28, 2017
1 parent 70e7856 commit a841274
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/filesystem/root/etc/haproxy/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ frontend public
default_backend octoprint

backend octoprint
acl needs_scheme req.hdr_cnt(X-Scheme) eq 0

reqrep ^([^\ :]*)\ /(.*) \1\ /\2
reqadd X-Scheme:\ https if { ssl_fc }
reqadd X-Scheme:\ https if needs_scheme { ssl_fc }
reqadd X-Scheme:\ http if needs_scheme !{ ssl_fc }
option forwardfor
server octoprint1 127.0.0.1:5000
errorfile 503 /etc/haproxy/errors/503-no-octoprint.http
Expand Down

0 comments on commit a841274

Please sign in to comment.