diff --git a/setup-scripts/skynet-nginx.conf b/setup-scripts/skynet-nginx.conf index 3cb280d3..67ad55d0 100644 --- a/setup-scripts/skynet-nginx.conf +++ b/setup-scripts/skynet-nginx.conf @@ -21,6 +21,28 @@ server { root /home/user/skynet-webportal/public; # path to root of index.html } + location /stats { + proxy_set_header Access-Control-Allow-Origin: *; + proxy_set_header User-Agent: Sia-Agent; + + # replace BASE64_AUTHENTICATION with base64 encoded : + # for sia user is empty so it's just : + # to generate the passcode use https://www.base64encode.org or any other base64 encoder + proxy_set_header Authorization "Basic BASE64_AUTHENTICATION"; + proxy_pass http://127.0.0.1:9970/skynet/stats; + } + + location /statsdown { + proxy_set_header Access-Control-Allow-Origin: *; + proxy_set_header User-Agent: Sia-Agent; + + # replace BASE64_AUTHENTICATION with base64 encoded : + # for sia user is empty so it's just : + # to generate the passcode use https://www.base64encode.org or any other base64 encoder + proxy_set_header Authorization "Basic BASE64_AUTHENTICATION"; + proxy_pass http://127.0.0.1:9980/skynet/stats; + } + location /skynet/skyfile/ { client_max_body_size 1000M; # make sure to limit the size of upload to a sane value proxy_read_timeout 600; @@ -73,4 +95,4 @@ server { } # SLL CERTIFICATES BELOW THIS LINE -} \ No newline at end of file +}