From f3c81f2cb6999f62b0fa9e3093d6cdc5d0c956a9 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Wed, 18 Sep 2024 17:26:02 +0200 Subject: [PATCH] Update Robust.Cdn reverse proxy config more --- src/en/server-hosting/setting-up-robust-cdn.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/en/server-hosting/setting-up-robust-cdn.md b/src/en/server-hosting/setting-up-robust-cdn.md index 649d51229..28aa02a6f 100644 --- a/src/en/server-hosting/setting-up-robust-cdn.md +++ b/src/en/server-hosting/setting-up-robust-cdn.md @@ -332,20 +332,24 @@ gzip on; gzip_types application/json; location / { - # High body size to avoid buffering of download request bodies. - client_body_buffer_size 10M; - # Increased read timeout to avoid timeouts on the publish API endpoint. - # Not strictly necessary for multi-request publishes, but cannot hurt. - proxy_read_timeout 120s; # Increased max body size for multi-request publishes. Not necessary for oneshot publishes. client_max_body_size 512m; + + # Do not buffer request bodies inside nginx, especially important for multi-request publishes. + proxy_request_buffering off; + # Disable buffering of outgoing responses. + proxy_buffering off; + # Ensure request and response can be streamed via HTTP 1.1. + proxy_http_version 1.1; + # Increased read timeout to avoid timeouts on the publish API endpoint. + # Not strictly necessary for multi-request publishes, but cannot hurt. + proxy_read_timeout 120s; + # Boilerplate reverse proxy config. proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - # Disable buffering of outgoing requests. - proxy_buffering off; # Update port here. proxy_pass http://localhost:8080;