Files

89 lines
2.8 KiB
Plaintext

# Dashboard
https://dashboard.{$NM_DOMAIN} {
# Apply basic security headers
header {
# Enable cross origin access to *.{$NM_DOMAIN}
Access-Control-Allow-Origin *.{$NM_DOMAIN}
# 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"
# Prevent MIME type sniffing
X-Content-Type-Options "nosniff"
# Control referrer information sent with requests
Referrer-Policy "strict-origin-when-cross-origin"
Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' js.intercomcdn.com widget.intercom.io app.posthog.com *.gitbook.com *.gitbook.io learn.netmaker.io raw.githubusercontent.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com *.gitbook.com *.gitbook.io learn.netmaker.io; font-src 'self' fonts.gstatic.com; img-src 'self' data: about: https:; media-src 'self' media.netmaker.io; connect-src 'self' data: https://api.{$NM_DOMAIN} app.posthog.com api.accounts.netmaker.io js.intercomcdn.com api-iam.intercom.io api.github.com nominatim.openstreetmap.org *.cartocdn.com; worker-src 'self' blob:; frame-src 'self' accounts.google.com github.com login.microsoftonline.com *.okta.com learn.netmaker.io;"
-Server
}
reverse_proxy http://netmaker-ui
}
# Netmaker Exporter
https://netmaker-exporter.{$NM_DOMAIN} {
reverse_proxy http://netmaker-exporter:8085
}
# Prometheus
# https://prometheus.{$NM_DOMAIN} {
# header {
# # Prevent MIME type sniffing
# X-Content-Type-Options "nosniff"
# # Control referrer information sent with requests
# Referrer-Policy "strict-origin-when-cross-origin"
# }
#
# reverse_proxy http://prometheus:9090
# }
# Grafana
https://grafana.{$NM_DOMAIN} {
header {
# Prevent MIME type sniffing
X-Content-Type-Options "nosniff"
# Control referrer information sent with requests
Referrer-Policy "strict-origin-when-cross-origin"
}
reverse_proxy http://grafana:3000
}
# API
https://api.{$NM_DOMAIN} {
header {
# Prevent MIME type sniffing
X-Content-Type-Options "nosniff"
# Control referrer information sent with requests
Referrer-Policy "strict-origin-when-cross-origin"
}
reverse_proxy http://netmaker:8081
}
# MQ
broker.{$NM_DOMAIN} {
@ws {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @ws mq:8883
}
default-gateway.{$NM_DOMAIN} {
reverse_proxy /uplink/v1 host.docker.internal:6443
}
# GRPC
# https://grpc.{$NM_DOMAIN} {
# reverse_proxy netmaker-exporter:50051 {
# transport http {
# versions h2c
# }
# }
# }