skynet endpoints

This commit is contained in:
Karol Wypchlo 2020-07-27 17:37:17 +02:00
parent 2a64b33cc9
commit dd53f31171
1 changed files with 31 additions and 1 deletions

View File

@ -57,6 +57,16 @@ server {
proxy_pass http://siad-download/skynet/blacklist; proxy_pass http://siad-download/skynet/blacklist;
} }
location /skynet/blacklist {
include /etc/nginx/conf.d/include/cors;
proxy_cache skynet;
proxy_cache_valid any 1m; # cache blacklist for 1 minute
proxy_set_header Access-Control-Allow-Origin: *;
proxy_set_header User-Agent: Sia-Agent;
proxy_pass http://siad-download/skynet/blacklist;
}
location /portals { location /portals {
include /etc/nginx/conf.d/include/cors; include /etc/nginx/conf.d/include/cors;
@ -67,7 +77,27 @@ server {
proxy_pass http://siad-download/skynet/portals; proxy_pass http://siad-download/skynet/portals;
} }
location ~ "(/skynet)?/stats" { location /skynet/portals {
include /etc/nginx/conf.d/include/cors;
proxy_cache skynet;
proxy_cache_valid any 1m; # cache portals for 1 minute
proxy_set_header Access-Control-Allow-Origin: *;
proxy_set_header User-Agent: Sia-Agent;
proxy_pass http://siad-download/skynet/portals;
}
location /stats {
include /etc/nginx/conf.d/include/cors;
proxy_cache skynet;
proxy_cache_valid any 1m; # cache stats for 1 minute
proxy_set_header Access-Control-Allow-Origin: *;
proxy_set_header User-Agent: Sia-Agent;
proxy_pass http://siad-upload/skynet/stats;
}
location /skynet/stats {
include /etc/nginx/conf.d/include/cors; include /etc/nginx/conf.d/include/cors;
proxy_cache skynet; proxy_cache skynet;