2020-06-22 09:54:01 +00:00
|
|
|
(webserver) {
|
|
|
|
root * /home/user/public_html
|
|
|
|
file_server
|
|
|
|
encode zstd gzip
|
|
|
|
|
|
|
|
@skylink {
|
|
|
|
path_regexp skylink ^/([a-zA-Z0-9-_]{46}(/.*)?)$
|
|
|
|
}
|
|
|
|
|
|
|
|
@skylink_file {
|
|
|
|
path_regexp skylink_file ^/file/([a-zA-Z0-9-_]{46}(/.*)?)$
|
|
|
|
}
|
|
|
|
|
|
|
|
@options {
|
|
|
|
method OPTIONS
|
|
|
|
}
|
|
|
|
|
2020-06-23 16:20:59 +00:00
|
|
|
@blacklist {
|
|
|
|
method GET
|
|
|
|
path /blacklist
|
|
|
|
}
|
|
|
|
|
|
|
|
@portals {
|
|
|
|
method GET
|
|
|
|
path /portals
|
|
|
|
}
|
|
|
|
|
2020-06-22 09:54:01 +00:00
|
|
|
# OPTIONS headers to allow CORS https://enable-cors.org
|
|
|
|
handle @options {
|
|
|
|
header {
|
|
|
|
Access-Control-Allow-Origin *
|
|
|
|
Access-Control-Allow-Methods GET,POST,OPTIONS
|
|
|
|
Access-Control-Allow-Headers DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range
|
|
|
|
Access-Control-Max-Age 1728000
|
|
|
|
}
|
|
|
|
respond 204
|
|
|
|
}
|
|
|
|
|
|
|
|
reverse_proxy /health-check health-check:3100
|
2020-07-27 09:30:55 +00:00
|
|
|
reverse_proxy /hns/* handshake-api:3100
|
|
|
|
reverse_proxy /hnsres/* handshake-api:3100
|
2020-06-22 09:54:01 +00:00
|
|
|
|
2020-06-23 16:20:59 +00:00
|
|
|
reverse_proxy @blacklist nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy @portals nginx:80 {
|
2020-06-22 09:54:01 +00:00
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy /stats nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy /statsdown nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy @skylink nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_up Access-Control-Expose-Headers skynet-file-metadata
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy @skylink_file nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_up Access-Control-Expose-Headers skynet-file-metadata
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
reverse_proxy /skynet/skyfile* nginx:80 {
|
|
|
|
header_up User-Agent Sia-Agent
|
|
|
|
header_up Authorization "Basic {env.SIA_API_AUTHORIZATION}"
|
|
|
|
header_down Access-Control-Allow-Origin *
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
(custom.domain) {
|
|
|
|
{$DOMAIN_NAME} {
|
|
|
|
tls {$EMAIL_ADDRESS}
|
|
|
|
import webserver
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
(siasky.net) {
|
|
|
|
siasky.net, *.siasky.net {
|
|
|
|
tls {
|
|
|
|
dns cloudflare {env.CLOUDFLARE_AUTH_TOKEN}
|
|
|
|
}
|
|
|
|
import webserver
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
(localhost) {
|
|
|
|
:443 {
|
|
|
|
tls internal {
|
|
|
|
on_demand
|
|
|
|
}
|
|
|
|
import webserver
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
import localhost
|
2020-07-17 19:12:18 +00:00
|
|
|
# import custom.domain
|
2020-06-22 09:54:01 +00:00
|
|
|
# import siasky.net
|