diff --git a/defaults/main.yml b/defaults/main.yml index 585a13d..ffb94f0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -173,6 +173,9 @@ nginx_vhosts_default: # index: index.html # add_headers: [] # proxy_pass: +# proxy_pass_request_body: +# proxy_next_upstream: +# proxy_redirect: # proxy_http_version: "1.1" # proxy_buffering: "off" # proxy_connect_timeout: 3600s @@ -182,6 +185,9 @@ nginx_vhosts_default: # proxy_hide_headers: [] # proxy_ignore_headers: [] # proxy_intercept_errors: "off" +# proxy_cache_bypass: +# proxy_no_cache: +# proxy_buffers: # custom_options: # custom_options: # - 'deny: all' diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 55bba10..c9e5f7e 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -69,6 +69,15 @@ server { {% endif %} {% if location.proxy_pass is defined and location.proxy_pass %} proxy_pass {{ location.proxy_pass }}; + {% if location.proxy_pass_request_body is defined and location.proxy_pass_request_body %} + proxy_pass_request_body {{ location.proxy_pass_request_body }}; + {% endif %} + {% if location.proxy_next_upstream is defined and location.proxy_next_upstream %} + proxy_next_upstream {{ location.proxy_next_upstream }}; + {% endif %} + {% if location.proxy_redirect is defined and location.proxy_redirect %} + proxy_redirect {{ location.proxy_redirect }}; + {% endif %} {% if location.proxy_http_version is defined and location.proxy_http_version %} proxy_http_version {{ location.proxy_http_version }}; {% endif %} @@ -87,6 +96,15 @@ server { {% if location.proxy_intercept_errors is defined and location.proxy_intercept_errors %} proxy_intercept_errors {{ location.proxy_intercept_errors }}; {% endif %} + {% if location.proxy_cache_bypass is defined and location.proxy_cache_bypass %} + proxy_cache_bypass {{ location.proxy_cache_bypass }}; + {% endif %} + {% if location.proxy_no_cache is defined and location.proxy_no_cache %} + proxy_no_cache {{ location.proxy_no_cache }}; + {% endif %} + {% if location.proxy_buffers is defined and location.proxy_buffers %} + proxy_buffers {{ location.proxy_buffers }}; + {% endif %} {% if location.proxy_set_headers is defined and location.proxy_set_headers %} {% for set in location.proxy_set_headers %}