[build]
  publish = "storyblok-site"

[[headers]]
  for = "/*"
  [headers.values]
    X-Frame-Options = "ALLOWALL"
    Content-Security-Policy = "frame-ancestors 'self' https://app.storyblok.com"

# CSS/JS: cache but revalidate on each visit (ETag ensures fast 304s)
[[headers]]
  for = "/css/*"
  [headers.values]
    Cache-Control = "public, max-age=0, must-revalidate"

[[headers]]
  for = "/js/*"
  [headers.values]
    Cache-Control = "public, max-age=0, must-revalidate"

# Images: cache long-term (these rarely change)
[[headers]]
  for = "/*.png"
  [headers.values]
    Cache-Control = "public, max-age=86400, stale-while-revalidate=604800"

[[headers]]
  for = "/*.jpg"
  [headers.values]
    Cache-Control = "public, max-age=86400, stale-while-revalidate=604800"

[[headers]]
  for = "/*.webp"
  [headers.values]
    Cache-Control = "public, max-age=86400, stale-while-revalidate=604800"

[[headers]]
  for = "/*.ico"
  [headers.values]
    Cache-Control = "public, max-age=86400, stale-while-revalidate=604800"
