Add stats endpoints to nginx

This commit is contained in:
Marcin Jachymiak 2020-03-18 16:36:30 -04:00
parent 16fe7acad0
commit f7bb6f1493
1 changed files with 23 additions and 1 deletions

View File

@ -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 <user>:<password>
# for sia user is empty so it's just :<password>
# 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 <user>:<password>
# for sia user is empty so it's just :<password>
# 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
}
}