Add stats endpoints to nginx
This commit is contained in:
parent
16fe7acad0
commit
f7bb6f1493
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue