# HTTP security headers for Cloudflare Pages / Netlify (copied into the site by `npm run build`).
# These are stronger than the <meta> CSP in index.html because headers can also block framing
# (clickjacking) and force HTTPS.

/*
  Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'; connect-src 'self' https://api.fda.gov; media-src 'none'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; worker-src 'self'; manifest-src 'self'; base-uri 'none'; form-action 'none'; upgrade-insecure-requests
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Referrer-Policy: no-referrer
  Cross-Origin-Opener-Policy: same-origin
  Cross-Origin-Resource-Policy: same-origin
  Permissions-Policy: camera=(self), microphone=(self), geolocation=(), payment=(), usb=(), bluetooth=(), serial=(), interest-cohort=()

# always check for a new service worker so updates reach phones quickly
/sw.js
  Cache-Control: no-cache

# fonts and icons never change name-for-content, cache them for a long time
/fonts/*
  Cache-Control: public, max-age=31536000, immutable
