mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Support multiple backends per domain with the help of some lua
This commit is contained in:
@ -115,10 +115,13 @@ cache basic_cache
|
||||
max-age 86400
|
||||
|
||||
backend servers
|
||||
balance leastconn
|
||||
# optional (recommended) ssl, requires CA cert installed on proxy and signeed cert on backends, you can also use "ssl verify none" but ssl can then be trivially mitm'd
|
||||
# default-server ssl verify required ca-file ca-certificates.crt sni req.hdr(Host)
|
||||
# use server based on hostname
|
||||
use-server %[req.hdr(host),lower,map(/etc/haproxy/map/backends.map)] if TRUE
|
||||
#use-server %[req.hdr(host),lower,map(/etc/haproxy/map/backends.map)] if TRUE
|
||||
# use multiple servers with lua
|
||||
use-server %[lua.get_server_names] if TRUE
|
||||
|
||||
backend bot_check_post_throttle
|
||||
stick-table type ipv6 size 100k expire 60s store http_req_rate(60s)
|
||||
|
Reference in New Issue
Block a user