Remove sia-upload from nginx config.
This commit is contained in:
parent
9c2d9e419d
commit
d084646d9f
|
@ -5,8 +5,8 @@ limit_conn_zone $binary_remote_addr zone=downloads_by_ip:10m;
|
|||
limit_req_status 429;
|
||||
limit_conn_status 429;
|
||||
|
||||
# since we are proxying request to nginx from caddy, access logs will contain caddy's ip address
|
||||
# as the request address so we need to use real_ip_header module to use ip address from
|
||||
# since we are proxying request to nginx from caddy, access logs will contain caddy's ip address
|
||||
# as the request address so we need to use real_ip_header module to use ip address from
|
||||
# X-Forwarded-For header as a real ip address of the request
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 127.0.0.1/32;
|
||||
|
@ -108,18 +108,18 @@ server {
|
|||
proxy_pass http://siad/skynet/stats;
|
||||
}
|
||||
|
||||
# This endpoint is a backward compatilibilty workaround for reporting stats from legacy
|
||||
# This endpoint is a backward compatilibilty workaround for reporting stats from legacy
|
||||
# upload siad node for portals that used double-siad setup. If your portal does not need
|
||||
# to support additional siad node, you can remove it from this config.
|
||||
location /statsdown {
|
||||
include /etc/nginx/conf.d/include/cors;
|
||||
|
||||
proxy_cache skynet;
|
||||
proxy_cache_valid any 10m; # cache stats for 10 minutes
|
||||
proxy_set_header User-Agent: Sia-Agent;
|
||||
proxy_read_timeout 5m; # extend the read timeout
|
||||
proxy_pass http://sia-upload:9980/skynet/stats; # serve upload node stats temporarily
|
||||
}
|
||||
; location /statsdown {
|
||||
; include /etc/nginx/conf.d/include/cors;
|
||||
;
|
||||
; proxy_cache skynet;
|
||||
; proxy_cache_valid any 10m; # cache stats for 10 minutes
|
||||
; proxy_set_header User-Agent: Sia-Agent;
|
||||
; proxy_read_timeout 5m; # extend the read timeout
|
||||
; proxy_pass http://sia-upload:9980/skynet/stats; # serve upload node stats temporarily
|
||||
; }
|
||||
|
||||
location /health-check {
|
||||
include /etc/nginx/conf.d/include/cors;
|
||||
|
@ -132,7 +132,7 @@ server {
|
|||
|
||||
set $skylink ''; # placeholder for the raw 46 bit skylink
|
||||
set $rest ''; # placeholder for the rest of the url that gets appended to skylink (path and args)
|
||||
|
||||
|
||||
# resolve handshake domain by requesting to /hnsres endpoint and assign correct values to $skylink and $rest
|
||||
access_by_lua_block {
|
||||
local json = require('cjson')
|
||||
|
@ -156,7 +156,7 @@ server {
|
|||
|
||||
# overwrite the Cache-Control header to only cache for 60s in case the domain gets updated
|
||||
more_set_headers 'Cache-Control: public, max-age=60';
|
||||
|
||||
|
||||
# we proxy to another nginx location rather than directly to siad because we don't want to deal with caching here
|
||||
proxy_pass http://127.0.0.1/$skylink$rest;
|
||||
|
||||
|
|
Reference in New Issue