Caddyfile-EE 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Dashboard
  2. https://dashboard.{$NM_DOMAIN} {
  3. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  4. # Apply basic security headers
  5. header {
  6. # Enable cross origin access to *.{$NM_DOMAIN}
  7. Access-Control-Allow-Origin *.{$NM_DOMAIN}
  8. # Enable HTTP Strict Transport Security (HSTS)
  9. Strict-Transport-Security "max-age=31536000;"
  10. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  11. X-XSS-Protection "1; mode=block"
  12. # Disallow the site to be rendered within a frame on a foreign domain (clickjacking protection)
  13. X-Frame-Options "SAMEORIGIN"
  14. # Prevent search engines from indexing
  15. X-Robots-Tag "none"
  16. # Remove the server name
  17. -Server
  18. }
  19. reverse_proxy http://netmaker-ui
  20. }
  21. # Netmaker Exporter
  22. https://netmaker-exporter.{$NM_DOMAIN} {
  23. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  24. reverse_proxy http://netmaker-exporter:8085
  25. }
  26. # Prometheus
  27. https://prometheus.{$NM_DOMAIN} {
  28. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  29. reverse_proxy http://prometheus:9090
  30. }
  31. # Grafana
  32. https://grafana.{$NM_DOMAIN} {
  33. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  34. reverse_proxy http://grafana:3000
  35. }
  36. # API
  37. https://api.{$NM_DOMAIN} {
  38. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  39. reverse_proxy http://netmaker:8081
  40. }
  41. # STUN
  42. https://stun.{$NM_DOMAIN} {
  43. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  44. reverse_proxy netmaker:3478
  45. }
  46. # TURN
  47. https://turn.{$NM_DOMAIN} {
  48. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  49. reverse_proxy host.docker.internal:3479
  50. }
  51. # TURN API
  52. https://turnapi.{$NM_DOMAIN} {
  53. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  54. reverse_proxy http://host.docker.internal:8089
  55. }
  56. # MQ
  57. wss://broker.{$NM_DOMAIN} {
  58. tls /root/certs/fullchain.pem /root/certs/privkey.pem
  59. reverse_proxy ws://mq:8883
  60. }