2021-10-04 03:50:22 +08:00
|
|
|
# Dashboard
|
2023-05-16 19:00:16 +08:00
|
|
|
https://dashboard.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2023-05-05 23:17:39 +08:00
|
|
|
# Apply basic security headers
|
|
|
|
header {
|
2023-05-16 19:00:16 +08:00
|
|
|
# Enable cross origin access to *.{$NM_DOMAIN}
|
|
|
|
Access-Control-Allow-Origin *.{$NM_DOMAIN}
|
2023-05-05 23:17:39 +08:00
|
|
|
# Enable HTTP Strict Transport Security (HSTS)
|
|
|
|
Strict-Transport-Security "max-age=31536000;"
|
|
|
|
# Enable cross-site filter (XSS) and tell browser to block detected attacks
|
|
|
|
X-XSS-Protection "1; mode=block"
|
|
|
|
# Disallow the site to be rendered within a frame on a foreign domain (clickjacking protection)
|
|
|
|
X-Frame-Options "SAMEORIGIN"
|
|
|
|
# Prevent search engines from indexing
|
|
|
|
X-Robots-Tag "none"
|
|
|
|
# Remove the server name
|
|
|
|
-Server
|
|
|
|
}
|
2022-01-14 04:05:16 +08:00
|
|
|
|
2023-05-05 23:17:39 +08:00
|
|
|
reverse_proxy http://netmaker-ui
|
2021-10-04 03:50:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# API
|
2023-05-16 19:00:16 +08:00
|
|
|
https://api.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2023-05-05 23:17:39 +08:00
|
|
|
reverse_proxy http://netmaker:8081
|
2021-10-04 03:50:22 +08:00
|
|
|
}
|
2022-11-29 01:16:50 +08:00
|
|
|
|
2022-12-06 21:57:38 +08:00
|
|
|
# STUN
|
2023-05-16 19:00:16 +08:00
|
|
|
https://stun.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2022-12-06 21:57:38 +08:00
|
|
|
reverse_proxy netmaker:3478
|
|
|
|
}
|
|
|
|
|
2023-03-22 15:00:03 +08:00
|
|
|
# TURN
|
2023-05-16 19:00:16 +08:00
|
|
|
https://turn.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2023-04-26 21:28:30 +08:00
|
|
|
reverse_proxy host.docker.internal:3479
|
2023-04-26 18:25:56 +08:00
|
|
|
}
|
|
|
|
|
2023-05-08 16:50:30 +08:00
|
|
|
# TURN API
|
2023-05-16 19:00:16 +08:00
|
|
|
https://turnapi.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2023-05-16 19:00:16 +08:00
|
|
|
reverse_proxy http://host.docker.internal:8089
|
2023-03-22 15:00:03 +08:00
|
|
|
}
|
|
|
|
|
2022-11-29 01:16:50 +08:00
|
|
|
# MQ
|
2023-05-16 19:00:16 +08:00
|
|
|
wss://broker.{$NM_DOMAIN} {
|
2023-05-10 23:27:53 +08:00
|
|
|
tls /root/certs/fullchain.pem /root/certs/privkey.pem
|
2023-05-05 23:17:39 +08:00
|
|
|
reverse_proxy ws://mq:8883 # For EMQX websockets use `reverse_proxy ws://mq:8083`
|
2022-11-29 01:16:50 +08:00
|
|
|
}
|