# Cloudflare Pages HTTP headers
# Format: pattern \n  Header-Name: value
# Docs: https://developers.cloudflare.com/pages/configuration/headers/

# --- Security headers for all pages ---
/*
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: geolocation=(), microphone=(), camera=()
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  Content-Security-Policy: default-src 'self'; img-src 'self' data: https://raw.githubusercontent.com https://tally.so https://www.google-analytics.com https://*.googletagmanager.com https://*.g.doubleclick.net; style-src 'self' 'unsafe-inline' https://tally.so; script-src 'self' 'unsafe-inline' https://tally.so https://www.googletagmanager.com https://static.cloudflareinsights.com; font-src 'self' https://tally.so; connect-src 'self' https://tally.so https://api.tally.so https://www.google-analytics.com https://*.analytics.google.com https://*.g.doubleclick.net https://stats.g.doubleclick.net https://static.cloudflareinsights.com https://cloudflareinsights.com; frame-src 'self' https://tally.so; media-src 'self'

# --- Aggressive caching for static assets (1 year, immutable) ---
/*.svg
  Cache-Control: public, max-age=31536000, immutable
  Access-Control-Allow-Origin: *

/*.css
  Cache-Control: public, max-age=31536000, immutable

/*.js
  Cache-Control: public, max-age=31536000, immutable

/*.woff2
  Cache-Control: public, max-age=31536000, immutable

# --- HTML pages: short cache + revalidate ---
/*.html
  Cache-Control: public, max-age=600, must-revalidate

/
  Cache-Control: public, max-age=600, must-revalidate
