Caddyfile 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. # FrankenPHP Caddyfile for the ui container.
  2. # Serves Slim from public/ on :8080.
  3. {
  4. frankenphp
  5. order php_server before file_server
  6. auto_https off
  7. admin off
  8. servers {
  9. trusted_proxies static private_ranges
  10. }
  11. }
  12. :8080 {
  13. root * /app/public
  14. encode zstd gzip
  15. # ── Security headers (M14) ──────────────────────────────────────────
  16. # CSP is set per-response by `App\Http\CspMiddleware` so the
  17. # `script-src 'nonce-…'` value can change per request, dropping
  18. # `'unsafe-inline'` / `'unsafe-eval'` (SEC_REVIEW F24).
  19. header {
  20. -Server
  21. -X-Powered-By
  22. X-Content-Type-Options "nosniff"
  23. X-Frame-Options "DENY"
  24. Referrer-Policy "strict-origin-when-cross-origin"
  25. Permissions-Policy "geolocation=(), microphone=(), camera=()"
  26. }
  27. @prod expression `{env.APP_ENV} == "production"`
  28. header @prod Strict-Transport-Security "max-age=31536000; includeSubDomains"
  29. php_server
  30. }