Caddyfile 983 B

123456789101112131415161718192021222324252627282930313233
  1. {
  2. # LetsEncrypt account
  3. email YOUR_EMAIL
  4. }
  5. # Dashboard
  6. https://dashboard.NETMAKER_BASE_DOMAIN {
  7. # Apply basic security headers
  8. header {
  9. # Enable HTTP Strict Transport Security (HSTS)
  10. Strict-Transport-Security "max-age=31536000;"
  11. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  12. X-XSS-Protection "1; mode=block"
  13. # Disallow the site to be rendered within a frame on a foreign domain (clickjacking protection)
  14. X-Frame-Options "SAMEORIGIN"
  15. # Prevent search engines from indexing
  16. X-Robots-Tag "none"
  17. # Remove the server name
  18. -Server
  19. }
  20. reverse_proxy http://127.0.0.1:8082
  21. }
  22. # API
  23. https://api.NETMAKER_BASE_DOMAIN {
  24. reverse_proxy http://127.0.0.1:8081
  25. }
  26. # gRPC
  27. https://grpc.NETMAKER_BASE_DOMAIN {
  28. reverse_proxy h2c://127.0.0.1:50051
  29. }