Browse Source

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 and proxy_request_buffering in order
to reduce buffering latency.

Closes-Bug: #1868503
Change-Id: I0a89e0845d6c7d2805556f87685d280b4e72122a
changes/83/783983/5
Billy Olsen 2 months ago
parent
commit
727c562f2d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      snap-overlay/templates/nginx.conf.j2

+ 6
- 0
snap-overlay/templates/nginx.conf.j2 View File

@ -16,6 +16,12 @@ http {
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# Disabled for glance image uploads. The maximum size will be
# determined by glance settings.
# TODO(wolsen): should the scope be narrowed to horizon/glance?
client_max_body_size 0;
proxy_buffering off;
proxy_request_buffering off;
include {{ snap }}/usr/conf/mime.types;
default_type application/octet-stream;


Loading…
Cancel
Save