Add ability to change client_body_buffer_size parameter value
Related: PROD-28629
Change-Id: I1862fda645bf8a79aa7d0364d8fe659568c4bfa5
diff --git a/nginx/files/proxy.conf b/nginx/files/proxy.conf
index ca69367..12fd60c 100644
--- a/nginx/files/proxy.conf
+++ b/nginx/files/proxy.conf
@@ -42,11 +42,13 @@
{%- if location.size is defined %}
client_max_body_size {{ location.size }};
- {%- if location.size.split("m")[0] | int > 200 %}
+ {%- if location.buffer_size is defined %}
+ client_body_buffer_size {{ location.buffer_size }};
+ {%- elif location.size.split("m")[0] | int > 200 %}
client_body_buffer_size 200m;
- {%- else %}
+ {%- else %}
client_body_buffer_size 20m;
- {%- endif %}
+ {%- endif %}
{%- else %}
client_max_body_size 20m;
client_body_buffer_size 20m;
diff --git a/tests/pillar/proxy_with_ssl.sls b/tests/pillar/proxy_with_ssl.sls
index 824fa07..e1d0a8d 100644
--- a/tests/pillar/proxy_with_ssl.sls
+++ b/tests/pillar/proxy_with_ssl.sls
@@ -251,6 +251,7 @@
port: 80
protocol: http
size: 10000m
+ buffer_size: 20m
timeout: 43200
websocket: true
request_buffer: false