Caddyfile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. # ZeroSSL account
  3. acme_ca https://acme.zerossl.com/v2/DV90
  4. email YOUR_EMAIL
  5. }
  6. # Dashboard
  7. https://dashboard.NETMAKER_BASE_DOMAIN {
  8. # Apply basic security headers
  9. header {
  10. # Enable cross origin access to *.NETMAKER_BASE_DOMAIN
  11. Access-Control-Allow-Origin *.NETMAKER_BASE_DOMAIN
  12. # Enable HTTP Strict Transport Security (HSTS)
  13. Strict-Transport-Security "max-age=31536000;"
  14. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  15. X-XSS-Protection "1; mode=block"
  16. # Disallow the site to be rendered within a frame on a foreign domain (clickjacking protection)
  17. X-Frame-Options "SAMEORIGIN"
  18. # Prevent search engines from indexing
  19. X-Robots-Tag "none"
  20. # Remove the server name
  21. -Server
  22. }
  23. reverse_proxy http://netmaker-ui
  24. }
  25. # API
  26. https://api.NETMAKER_BASE_DOMAIN {
  27. reverse_proxy http://netmaker:8081
  28. }
  29. # STUN
  30. https://stun.NETMAKER_BASE_DOMAIN {
  31. reverse_proxy netmaker:3478
  32. }
  33. # MQ
  34. wss://broker.NETMAKER_BASE_DOMAIN {
  35. reverse_proxy ws://mq:8883 # For EMQX websockets use `reverse_proxy ws://mq:8083`
  36. }