fix cors
This commit is contained in:
parent
dd53f31171
commit
5890b5e8ef
|
@ -52,7 +52,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache blacklist for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-download/skynet/blacklist;
|
proxy_pass http://siad-download/skynet/blacklist;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +61,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache blacklist for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-download/skynet/blacklist;
|
proxy_pass http://siad-download/skynet/blacklist;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +70,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache portals for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-download/skynet/portals;
|
proxy_pass http://siad-download/skynet/portals;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +79,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache portals for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-download/skynet/portals;
|
proxy_pass http://siad-download/skynet/portals;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +88,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache stats for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-upload/skynet/stats;
|
proxy_pass http://siad-upload/skynet/stats;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +97,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache stats for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-upload/skynet/stats;
|
proxy_pass http://siad-upload/skynet/stats;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +106,6 @@ server {
|
||||||
|
|
||||||
proxy_cache skynet;
|
proxy_cache skynet;
|
||||||
proxy_cache_valid any 1m; # cache stats for 1 minute
|
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_set_header User-Agent: Sia-Agent;
|
||||||
proxy_pass http://siad-download/skynet/stats;
|
proxy_pass http://siad-download/skynet/stats;
|
||||||
}
|
}
|
||||||
|
@ -120,21 +113,18 @@ server {
|
||||||
location /health-check {
|
location /health-check {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_pass http://health-check:3100;
|
proxy_pass http://health-check:3100;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /hns {
|
location /hns {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_pass http://handshake-api:3100;
|
proxy_pass http://handshake-api:3100;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /hnsres {
|
location /hnsres {
|
||||||
include /etc/nginx/conf.d/include/cors;
|
include /etc/nginx/conf.d/include/cors;
|
||||||
|
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_pass http://handshake-api:3100;
|
proxy_pass http://handshake-api:3100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +136,6 @@ server {
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
|
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
|
||||||
proxy_set_header Expect $http_expect;
|
proxy_set_header Expect $http_expect;
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
|
||||||
# Extract 3 sets of 2 characters from $request_id and assign to $dir1, $dir2, $dir3
|
# Extract 3 sets of 2 characters from $request_id and assign to $dir1, $dir2, $dir3
|
||||||
|
@ -185,7 +174,6 @@ server {
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
|
proxy_request_buffering off; # stream uploaded files through the proxy as it comes in
|
||||||
proxy_set_header Expect $http_expect;
|
proxy_set_header Expect $http_expect;
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
|
|
||||||
# we need to explicitly use set directive here because $1 will contain the siapath with
|
# we need to explicitly use set directive here because $1 will contain the siapath with
|
||||||
|
@ -217,7 +205,6 @@ server {
|
||||||
set $skylink $1;
|
set $skylink $1;
|
||||||
|
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
# proxy this call to siad /skynet/skylink/ endpoint (make sure the ip is correct)
|
# proxy this call to siad /skynet/skylink/ endpoint (make sure the ip is correct)
|
||||||
proxy_pass http://siad-download/skynet/skylink/$skylink$is_args$args;
|
proxy_pass http://siad-download/skynet/skylink/$skylink$is_args$args;
|
||||||
|
@ -243,7 +230,6 @@ server {
|
||||||
set $skylink $1;
|
set $skylink $1;
|
||||||
|
|
||||||
proxy_read_timeout 600;
|
proxy_read_timeout 600;
|
||||||
proxy_set_header Access-Control-Allow-Origin: *;
|
|
||||||
proxy_set_header User-Agent: Sia-Agent;
|
proxy_set_header User-Agent: Sia-Agent;
|
||||||
# proxy this call to siad /skynet/skylink/ endpoint (make sure the ip is correct)
|
# proxy this call to siad /skynet/skylink/ endpoint (make sure the ip is correct)
|
||||||
# this alias also adds attachment=true url param to force download the file
|
# this alias also adds attachment=true url param to force download the file
|
||||||
|
|
Reference in New Issue