diff --git a/README.md b/README.md index 89cb2f7..76f00b0 100644 --- a/README.md +++ b/README.md @@ -503,6 +503,7 @@ nginx_http_template: proxy_ignore_headers: - Vary - Cache-Control + proxy_buffering: false proxy_http_version: 1.0 websocket: false auth_basic: null diff --git a/defaults/main.yml b/defaults/main.yml index 54fc12a..a2859dc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -315,6 +315,7 @@ nginx_http_template: proxy_ignore_headers: - Vary - Cache-Control + proxy_buffering: false proxy_http_version: 1.0 websocket: false auth_basic: null diff --git a/templates/http/default.conf.j2 b/templates/http/default.conf.j2 index 4b363a6..b6667be 100644 --- a/templates/http/default.conf.j2 +++ b/templates/http/default.conf.j2 @@ -244,6 +244,9 @@ server { {% if item.value.reverse_proxy.locations[location].proxy_ignore_headers is defined %} proxy_ignore_headers {{ item.value.reverse_proxy.locations[location].proxy_ignore_headers | join(" ") }}; {% endif %} +{% if item.value.reverse_proxy.locations[location].proxy_buffering is defined %} + proxy_buffering {{ item.value.reverse_proxy.locations[location].proxy_buffering | ternary("on", "off") }}; +{% endif %} {% if (item.value.reverse_proxy.health_check_plus is defined) and item.value.reverse_proxy.health_check_plus %} health_check; {% endif %} diff --git a/tests/playbooks/nginx-http-template.yml b/tests/playbooks/nginx-http-template.yml index 18e91ac..4e482ef 100644 --- a/tests/playbooks/nginx-http-template.yml +++ b/tests/playbooks/nginx-http-template.yml @@ -87,6 +87,7 @@ header_x_forwarded_proto: name: X-Forwarded-Proto value: $scheme + proxy_buffering: false backend: location: /backend proxy_pass: http://backend_servers/