Merge pull request #543 from NebulousLabs/fix-downloading-skylink

fix downloading skylink
This commit is contained in:
Ivaylo Novakov 2020-11-27 11:26:02 +01:00 committed by GitHub
commit 9ea30d92f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -289,6 +289,8 @@ server {
location ~ "^/file/([a-zA-Z0-9-_]{46}(/.*)?)$" {
include /etc/nginx/conf.d/include/proxy-buffer;
rewrite /file/(.*) $1 break; # drop the /file/ prefix from uri
proxy_pass http://127.0.0.1/$uri?attachment=true&$args;
}

View File

@ -2,7 +2,7 @@ proxy_cache skynet;
slice 1m;
proxy_http_version 1.1; # upgrade if necessary because 1.0 does not support byte-range requests
proxy_set_header Range $slice_range; # pass slice range to proxy
proxy_cache_key $uri$arg_format$slice_range; # use just the uri path, format arg and slice range
proxy_cache_key $uri$arg_format$arg_attachment$slice_range; # use just the uri path, format and attachment args and slice range
proxy_cache_min_uses 3; # cache responses after 3 requests of the same file
proxy_cache_valid 200 206 24h; # cache 200 and 206 responses for 24 hours
proxy_cache_bypass $cookie_nocache $arg_nocache; # add cache bypass option