Mark Pitt
claude-skills
  1. claude-skills
  2. Developer environment
  3. cloudflare-workers-static-site
  4. templates/_headers

A file in cloudflare-workers-static-site

templates/_headers

Plain text 14 lines 799 B
_headersPlain text, shown as text and never run
# Copy into the folder your build copies verbatim (public/ or static/).
# Tighten or loosen the Content-Security-Policy to match what the site loads.
/*
  X-Content-Type-Options: nosniff
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: camera=(), microphone=(), geolocation=()
  Content-Security-Policy: default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self'; form-action 'self'; frame-ancestors 'none'; base-uri 'self'

# Hashed build assets never change, so cache them for a year.
# Astro uses /_astro/, Vite uses /assets/. Keep the one your build emits.
/_astro/*
  Cache-Control: public, max-age=31536000, immutable
/assets/*
  Cache-Control: public, max-age=31536000, immutable