From 4d834210f23411461a55e8d97476e1f13e1f40fd Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Tue, 30 Mar 2021 10:31:17 -0700 Subject: [PATCH] Disable client_max_body_size checks in nginx By default, nginx has a small (1MB) limit on the size of uploads, which prevents using horizon interface to upload an image. Disabling the client_max_body_size check allows for the glance configuration to govern the maximum size image that should be accepted. This change also disables proxy_buffering to reduce buffering latency. Closes-Bug: #1868503 Change-Id: I0a89e0845d6c7d2805556f87685d280b4e72122a --- snap-overlay/templates/nginx.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snap-overlay/templates/nginx.conf.j2 b/snap-overlay/templates/nginx.conf.j2 index 83155a8..281b379 100644 --- a/snap-overlay/templates/nginx.conf.j2 +++ b/snap-overlay/templates/nginx.conf.j2 @@ -15,6 +15,8 @@ http { tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; + client_max_body_size 0; + proxy_buffering off; types_hash_max_size 2048; include {{ snap }}/usr/conf/mime.types;