Remove sia-upload from nginx config.

This commit is contained in:
Ivaylo Novakov 2020-09-23 14:36:19 +02:00
parent 9c2d9e419d
commit d084646d9f
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
1 changed files with 14 additions and 14 deletions

View File

@ -5,8 +5,8 @@ limit_conn_zone $binary_remote_addr zone=downloads_by_ip:10m;
limit_req_status 429; limit_req_status 429;
limit_conn_status 429; limit_conn_status 429;
# since we are proxying request to nginx from caddy, access logs will contain caddy's ip address # 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 # 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 # 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 10.0.0.0/8;
set_real_ip_from 127.0.0.1/32; set_real_ip_from 127.0.0.1/32;
@ -108,18 +108,18 @@ server {
proxy_pass http://siad/skynet/stats; 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 # 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. # to support additional siad node, you can remove it from this config.
location /statsdown { ; location /statsdown {
include /etc/nginx/conf.d/include/cors; ; include /etc/nginx/conf.d/include/cors;
;
proxy_cache skynet; ; proxy_cache skynet;
proxy_cache_valid any 10m; # cache stats for 10 minutes ; proxy_cache_valid any 10m; # cache stats for 10 minutes
proxy_set_header User-Agent: Sia-Agent; ; proxy_set_header User-Agent: Sia-Agent;
proxy_read_timeout 5m; # extend the read timeout ; proxy_read_timeout 5m; # extend the read timeout
proxy_pass http://sia-upload:9980/skynet/stats; # serve upload node stats temporarily ; proxy_pass http://sia-upload:9980/skynet/stats; # serve upload node stats temporarily
} ; }
location /health-check { location /health-check {
include /etc/nginx/conf.d/include/cors; include /etc/nginx/conf.d/include/cors;
@ -132,7 +132,7 @@ server {
set $skylink ''; # placeholder for the raw 46 bit skylink 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) 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 # resolve handshake domain by requesting to /hnsres endpoint and assign correct values to $skylink and $rest
access_by_lua_block { access_by_lua_block {
local json = require('cjson') 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 # 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'; 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 # 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; proxy_pass http://127.0.0.1/$skylink$rest;