Skip to content
Snippets Groups Projects
Commit a40b6dcc authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/arocom#163 Configure HaProxy and Varnish to properly...

ansible-inventories/arocom#163 Configure HaProxy and Varnish to properly handle PURGE requests on port 80
parent db36f188
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,8 @@ sub vcl_recv {
# Allow purging
if (req.method == "PURGE") {
if (!client.ip ~ purge) { # purge is the ACL defined at the begining
# Make sure that HaProxy has been setting the header value x-real-ip properly
if (!std.ip(req.http.x-real-ip, "0.0.0.0") ~ purge) { # purge is the ACL defined at the beginning
# Not from an allowed IP? Then die with an error.
return (synth(405, "This IP is not allowed to send PURGE requests."));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment