From a6da281ef9b312d133381f0a51f84e4bae410a65 Mon Sep 17 00:00:00 2001 From: BestLibre Date: Tue, 6 Feb 2018 10:30:51 +0100 Subject: [PATCH] Option to set max_body_size for nginx --- nginx_proxy/config.json | 6 ++++-- nginx_proxy/vhost.mustache | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nginx_proxy/config.json b/nginx_proxy/config.json index 638c6b1..2452273 100644 --- a/nginx_proxy/config.json +++ b/nginx_proxy/config.json @@ -1,6 +1,6 @@ { "name": "Nginx Proxy", - "version": "0.1.9", + "version": "0.1.10", "slug": "nginx_proxy", "description": "Nginx Proxy for multiple VHOSTS", "url": "https://github.com/bestlibre/hassio-addons/tree/master/nginx_proxy", @@ -22,7 +22,9 @@ "default_server": "bool?", "certname": "str?", "ssl_modern": "bool?", - "auth": "str?"} + "auth": "str?", + "max_body_size": "str?" + } ] }, "ports": {"80/tcp": 80, "443/tcp": 443}, diff --git a/nginx_proxy/vhost.mustache b/nginx_proxy/vhost.mustache index 28ac8ba..5b6d965 100644 --- a/nginx_proxy/vhost.mustache +++ b/nginx_proxy/vhost.mustache @@ -64,7 +64,9 @@ server { auth_basic "password protected"; auth_basic_user_file /data/auth_{{vhost}}; {{/auth}} - + {{#max_body_size}} + client_max_body_size {{max_body_size}}; + {{/max_body_size}} location / { proxy_pass http://{{#remote}}{{remote}}{{/remote}}{{^remote}}172.17.0.1{{/remote}}:{{port}}; }