Caddyfile 851 B

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