simple redirect map

master
Thomas Lynch 1 year ago
parent 4c97df8fb1
commit 5b98b5b15c
Signed by: fatchan
GPG Key ID: A7E5E8B7E11EE92D
  1. 1
      README.md
  2. 3
      haproxy/haproxy.cfg
  3. 1
      haproxy/map/rewrite.map

@ -18,6 +18,7 @@ Integrates with https://gitgud.io/fatchan/haproxy-panel-next to add/remove/edit
- Improved the appearance of the challenge page.
- Add several useful maps & acls to the haproxy config:
- Whitelist or blacklist IPs/subnets.
- Simple redirect/rewrite map for domains.
- Maintenance mode page for selected domains.
- Fix multiple security issues.
- Many bugfixes.

@ -78,6 +78,9 @@ frontend http-in
acl maintenance_mode hdr(host),lower,map_str(/etc/haproxy/map/maintenance.map) -m found
http-request return lf-file /etc/haproxy/template/maintenance.html status 200 content-type "text/html; charset=utf-8" hdr "cache-control" "private, max-age=30" if maintenance_mode
# map if you want a domain to be a redirect from the edge (302 for now)
http-request redirect location https://%[hdr(host),map(/etc/haproxy/map/rewrite.map)]%[capture.req.uri] code 302 if { hdr(host),map(/etc/haproxy/map/rewrite.map) -i -m found }
# create acl for bools updated by lua
acl captcha_passed var(txn.captcha_passed) -m bool
acl pow_passed var(txn.pow_passed) -m bool

@ -0,0 +1 @@
localhost cp.basedflare.com
Loading…
Cancel
Save