Created
October 25, 2017 09:31
-
-
Save zot24/1af56991d23b97ddf4948bfbbbca8368 to your computer and use it in GitHub Desktop.
Custom Rancher Load Balancer haproxy.cfg to redirect any request under http to https and to redirect www. request to remove www.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| backend www-redirect | |
| http-request redirect prefix https://%[hdr(host),regsub(^www\.,,i)] code 302 if { hdr_beg(host) -i www. } | |
| backend https-redirect | |
| http-request redirect scheme https code 302 if !{ ssl_fc } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment