diff --git a/templates/haproxy_cfg.jinja2 b/templates/haproxy_cfg.jinja2 index fa327e43d0aa058579e9be9e963c6d33a3be68d2..7544eee8dd0cc225b17d028f1005fde17957129d 100644 --- a/templates/haproxy_cfg.jinja2 +++ b/templates/haproxy_cfg.jinja2 @@ -162,6 +162,7 @@ frontend http_in {% endif %} acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list {% if varnish_host|default(false) %} + acl request_ignores_varnish hdr(x-varnish-ignore) -m found acl is_purge method PURGE use_backend backend_varnish if is_purge acl is_ban method BAN @@ -173,8 +174,8 @@ frontend http_in acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot acl static_content_private path_beg /system/ - use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish - use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish + use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish !request_ignores_varnish + use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish !request_ignores_varnish {% endif %} {% if 'webserver' in groups %} {% for host in groups['webserver']|sort %} @@ -307,11 +308,12 @@ frontend https_in_{{ cert.ip }} {% endif %} acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list {% if varnish_host|default(false) %} + acl request_ignores_varnish hdr(x-varnish-ignore) -m found acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot acl static_content_private path_beg /system/ - use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish - use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish + use_backend backend_varnish_bigpipe if static_content !static_content_private domain_uses_bigpipe !domain_ignores_varnish !request_ignores_varnish + use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish !request_ignores_varnish {% endif %} {% if 'webserver' in groups %} {% for host in groups['webserver']|sort %}