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

ansible-inventories/arocom#2812 Allow to avoid Varnish on a per-request-basis...

ansible-inventories/arocom#2812 Allow to avoid Varnish on a per-request-basis by using a special request header
parent 39438b69
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,7 @@ frontend http_in ...@@ -162,6 +162,7 @@ frontend http_in
{% endif %} {% endif %}
acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list
{% if varnish_host|default(false) %} {% if varnish_host|default(false) %}
acl request_ignores_varnish hdr(x-varnish-ignore) -m found
acl is_purge method PURGE acl is_purge method PURGE
use_backend backend_varnish if is_purge use_backend backend_varnish if is_purge
acl is_ban method BAN acl is_ban method BAN
...@@ -173,8 +174,8 @@ frontend http_in ...@@ -173,8 +174,8 @@ frontend http_in
acl domain_ignores_varnish hdr(host) -i -n -f /etc/haproxy/ignore_varnish.list 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 path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot
acl static_content_private path_beg /system/ 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_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 use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish !request_ignores_varnish
{% endif %} {% endif %}
{% if 'webserver' in groups %} {% if 'webserver' in groups %}
{% for host in groups['webserver']|sort %} {% for host in groups['webserver']|sort %}
...@@ -307,11 +308,12 @@ frontend https_in_{{ cert.ip }} ...@@ -307,11 +308,12 @@ frontend https_in_{{ cert.ip }}
{% endif %} {% endif %}
acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list acl domain_uses_bigpipe hdr(host) -i -n -f /etc/haproxy/use_bigpipe.list
{% if varnish_host|default(false) %} {% 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 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 path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html .ttf .woff .woff2 .svg .eot
acl static_content_private path_beg /system/ 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_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 use_backend backend_varnish if static_content !static_content_private !domain_ignores_varnish !request_ignores_varnish
{% endif %} {% endif %}
{% if 'webserver' in groups %} {% if 'webserver' in groups %}
{% for host in groups['webserver']|sort %} {% for host in groups['webserver']|sort %}
......
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