From 45688eeab18ada54a5d05632d90d48eecc907ad8 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 3 Nov 2021 09:57:55 +0100 Subject: [PATCH] Increase the request body size of the /skynet/restore endpoint to 5MB. --- docker/nginx/conf.d/server/server.api | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker/nginx/conf.d/server/server.api b/docker/nginx/conf.d/server/server.api index 9f966d0d..56c556a7 100644 --- a/docker/nginx/conf.d/server/server.api +++ b/docker/nginx/conf.d/server/server.api @@ -112,6 +112,10 @@ location /skynet/registry { include /etc/nginx/conf.d/include/location-skynet-registry; } +location /skynet/restore { + client_max_body_size 5M; +} + location /skynet/skyfile { include /etc/nginx/conf.d/include/cors; include /etc/nginx/conf.d/include/sia-auth; @@ -158,8 +162,8 @@ location /skynet/tus { # TUS chunks size is 40M + leaving 10M of breathing room client_max_body_size 50M; - - # Those timeouts need to be elevated since skyd can stall reading + + # Those timeouts need to be elevated since skyd can stall reading # data for a while when overloaded which would terminate connection client_body_timeout 1h; proxy_send_timeout 1h; @@ -234,7 +238,7 @@ location /skynet/metadata { -- do not expose internal header ngx.header["Skynet-Requested-Skylink"] = "" - } + } proxy_set_header User-Agent: Sia-Agent; proxy_pass http://sia:9980; @@ -249,7 +253,7 @@ location /skynet/resolve { -- do not expose internal header ngx.header["Skynet-Requested-Skylink"] = "" - } + } proxy_set_header User-Agent: Sia-Agent; proxy_pass http://sia:9980;