11 lines
494 B
Smarty
11 lines
494 B
Smarty
|
# Backend for blocked IPs - serves blocked page with 403 status
|
||
|
backend blocked-backend
|
||
|
mode http
|
||
|
option http-server-close
|
||
|
http-request set-header X-Forwarded-Proto https if { ssl_fc }
|
||
|
http-request set-header X-Forwarded-Port %[dst_port]
|
||
|
http-request set-header X-Forwarded-For %[src]
|
||
|
http-request set-header X-Real-IP %[src]
|
||
|
|
||
|
# Return 403 Forbidden for blocked IPs
|
||
|
http-request return status 403 content-type text/html file /etc/haproxy/blocked_ip_page.html
|