From 9e2fe99c6e6a70ab1aea6392b691f30463b9028b Mon Sep 17 00:00:00 2001 From: Edoardo Putti Date: Sun, 2 Jul 2017 17:44:57 +0200 Subject: [PATCH] [nginx] set max_body_size as variable with default --- roles/nginx/defaults/main.yml | 2 ++ roles/nginx/templates/proxy.conf.nginx.j2 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/nginx/defaults/main.yml b/roles/nginx/defaults/main.yml index db691ea..6a25023 100644 --- a/roles/nginx/defaults/main.yml +++ b/roles/nginx/defaults/main.yml @@ -2,3 +2,5 @@ is_proxy: false php: false config_name: null + # max body size in Mb + max_body_size: 8 diff --git a/roles/nginx/templates/proxy.conf.nginx.j2 b/roles/nginx/templates/proxy.conf.nginx.j2 index 79a71c6..0d35500 100644 --- a/roles/nginx/templates/proxy.conf.nginx.j2 +++ b/roles/nginx/templates/proxy.conf.nginx.j2 @@ -1,5 +1,5 @@ location / { - client_max_body_size 50M; + client_max_body_size {{ max_body_size }}M; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host;