Unverified Commit c60450ec authored by Michael Killough's avatar Michael Killough Committed by GitHub
Browse files

Merge pull request #6 from deliveroo/body_size

Allow client_body_buffer_size to be overriden.
parents 7479e100 5497f719
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
0.2.2
0.3.0
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ http {
  server {
    listen <NGINX_PORT> deferred;

    client_body_buffer_size <CLIENT_BODY_BUFFER_SIZE>;
    client_max_body_size 5M; # default 1M

    location / {
+5 −1
Original line number Diff line number Diff line
@@ -4,7 +4,11 @@ set -ex

# nginx.conf doesn't support environment variables,
# so we substitute at run time
/bin/sed -e "s/<NGINX_PORT>/${NGINX_PORT}/g" -e "s/<APP_PORT>/${APP_PORT}/g" /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
/bin/sed \
  -e "s/<NGINX_PORT>/${NGINX_PORT}/g" \
  -e "s/<APP_PORT>/${APP_PORT}/g" \
  -e "s/<CLIENT_BODY_BUFFER_SIZE>/${CLIENT_BODY_BUFFER_SIZE:-8k}/g" \
  /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf

# Wait for the application to start before accepting ALB requests.
while sleep 2; do