From 0d1b2f9193bdd3bf65e2e9a85b7ccbdd3a6ea996 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Mon, 15 Aug 2016 10:59:50 +0200 Subject: [PATCH] ansible-inventories/arocom#163 Configure HaProxy and Varnish to properly handle PURGE requests on port 80 --- templates/haproxy_cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg index f355dbe..051a768 100644 --- a/templates/haproxy_cfg +++ b/templates/haproxy_cfg @@ -90,6 +90,8 @@ frontend http_in {% endfor %} acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list {% if varnish_host|default(false) %} + acl is_purge method PURGE + use_backend backend_varnish if is_purge acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list use_backend backend_varnish_bigpipe if domain_uses_bigpipe !domain_ignores_varnish acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html @@ -208,6 +210,7 @@ backend backend_{{host}}_https_bigpipe backend backend_varnish option httpchk HEAD /varnishcheck + http-request set-header x-real-ip %[src] http-check expect status 200 option forwardfor hash-type consistent -- GitLab