Use Next.js middleware for CSP so frame-ancestors works at runtime

Fixkamo-analytics
Navios
17 de abril de 2026 às 19:11 UTC
Autor
Kamo
Enviar
da342fc

The standalone build bakes next.config.ts headers at build time, so ALLOWED_FRAME_URLS was always empty. Move CSP to a Next.js middleware that reads the env var at request time. This allows analytics to be embedded in iframes from kamo-internal without needing build-time env vars.

Todas as alterações

Como o que vês no transporte?

Cada uma dessas atualizações pousa automaticamente em seu espaço de trabalho. Comece grátis e veja crescer semana após semana.

Começar Livre Para SempreVer Preços