Merge pull request #1346 from SkynetLabs/ivo/inc_body_restore

Increase the request body size of the /skynet/restore endpoint to 5MB.
This commit is contained in:
Karol Wypchło 2021-11-08 16:31:40 +01:00 committed by GitHub
commit d4eb04f702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 4 deletions

View File

@ -112,6 +112,24 @@ location /skynet/registry {
include /etc/nginx/conf.d/include/location-skynet-registry; include /etc/nginx/conf.d/include/location-skynet-registry;
} }
location /skynet/restore {
include /etc/nginx/conf.d/include/cors;
include /etc/nginx/conf.d/include/sia-auth;
client_max_body_size 5M;
# increase request timeouts
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
proxy_set_header Expect $http_expect;
proxy_set_header User-Agent: Sia-Agent;
# proxy this call to siad endpoint (make sure the ip is correct)
proxy_pass http://sia:9980;
}
location /skynet/skyfile { location /skynet/skyfile {
include /etc/nginx/conf.d/include/cors; include /etc/nginx/conf.d/include/cors;
include /etc/nginx/conf.d/include/sia-auth; include /etc/nginx/conf.d/include/sia-auth;
@ -158,8 +176,8 @@ location /skynet/tus {
# TUS chunks size is 40M + leaving 10M of breathing room # TUS chunks size is 40M + leaving 10M of breathing room
client_max_body_size 50M; 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 # data for a while when overloaded which would terminate connection
client_body_timeout 1h; client_body_timeout 1h;
proxy_send_timeout 1h; proxy_send_timeout 1h;
@ -234,7 +252,7 @@ location /skynet/metadata {
-- do not expose internal header -- do not expose internal header
ngx.header["Skynet-Requested-Skylink"] = "" ngx.header["Skynet-Requested-Skylink"] = ""
} }
proxy_set_header User-Agent: Sia-Agent; proxy_set_header User-Agent: Sia-Agent;
proxy_pass http://sia:9980; proxy_pass http://sia:9980;
@ -249,7 +267,7 @@ location /skynet/resolve {
-- do not expose internal header -- do not expose internal header
ngx.header["Skynet-Requested-Skylink"] = "" ngx.header["Skynet-Requested-Skylink"] = ""
} }
proxy_set_header User-Agent: Sia-Agent; proxy_set_header User-Agent: Sia-Agent;
proxy_pass http://sia:9980; proxy_pass http://sia:9980;