Thank you for your quick reply @lukastribus
You don’t have any persistence configured, so forcing persistence is not going to achieve anything.
This explains everything. So force-persist
isn’t exactly what I’m looking for.
Here the ACLs I was testing with:
acl from_authorized_ip src 192.168.1.11/32
acl from_authorized_ip src 10.0.0.23/32
acl has_bypass_cookie_true hdr_sub(cookie) -i BYPASS_MAINTENANCE=true
force-persist if from_authorized_ip or has_bypass_cookie_true
I finally decided to use a “maintenance” backend:
frontend http
...
acl ...
#use_backend maintenance unless from_authorized_ip or has_bypass_cookie_true
use_backend app
backend maintenance
errorfile 503 /data/shared/maintenance/http/503.http
For the moment, I un/comment the line, but I plan to use a value in a file to trigger it.