improve caching
This commit is contained in:
parent
c155fcfa55
commit
c050948d23
|
@ -129,6 +129,10 @@ server {
|
||||||
location /hns {
|
location /hns {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
include /etc/nginx/conf.d/include/proxy-buffer;
|
include /etc/nginx/conf.d/include/proxy-buffer;
|
||||||
|
include /etc/nginx/conf.d/include/proxy-cache-downloads;
|
||||||
|
|
||||||
|
limit_conn downloads_by_ip 100; # ddos protection: max 100 downloads at a time
|
||||||
|
add_header Cache-Control "public, max-age=86400"; # allow consumer to cache response
|
||||||
|
|
||||||
set $skylink '';
|
set $skylink '';
|
||||||
set $skylink_path '';
|
set $skylink_path '';
|
||||||
|
@ -147,6 +151,9 @@ server {
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proxy_read_timeout 600;
|
||||||
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
|
||||||
proxy_pass http://siad/skynet/skylink/$skylink$skylink_path;
|
proxy_pass http://siad/skynet/skylink/$skylink$skylink_path;
|
||||||
|
|
||||||
header_filter_by_lua_block {
|
header_filter_by_lua_block {
|
||||||
|
|
Reference in New Issue