Caddyfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # LYNX SHARE server: Caddy reverse proxy with automatic HTTPS (Let's Encrypt / ZeroSSL).
  2. # Installed to /etc/caddy/Caddyfile by server/setup.sh. The services listen on 127.0.0.1 only.
  3. {
  4. # no admin endpoint on a public port (default is localhost:2019, kept)
  5. servers {
  6. protocols h1 h2 h3
  7. }
  8. }
  9. (common) {
  10. header {
  11. Strict-Transport-Security "max-age=31536000"
  12. X-Content-Type-Options nosniff
  13. Referrer-Policy no-referrer
  14. -Server
  15. }
  16. # Access log without client addresses or headers (privacy: same rule as the crash-report API, PRIVACY.md).
  17. log {
  18. output file /var/log/caddy/lynx-access.log {
  19. roll_size 20MiB
  20. roll_keep 10
  21. roll_keep_for 720h
  22. }
  23. format filter {
  24. wrap json
  25. fields {
  26. request>remote_ip delete
  27. request>remote_port delete
  28. request>client_ip delete
  29. request>headers delete
  30. resp_headers delete
  31. }
  32. }
  33. }
  34. }
  35. api.lynx-share.com {
  36. import common
  37. # share uploads: at most 2 GiB per file (the service checks the declared size too)
  38. request_body {
  39. max_size 2100MB
  40. }
  41. reverse_proxy 127.0.0.1:8081 {
  42. flush_interval -1
  43. }
  44. }
  45. relay.lynx-share.com {
  46. import common
  47. request_body {
  48. max_size 64KB
  49. }
  50. reverse_proxy 127.0.0.1:8082
  51. }