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

Fixkamo-analytics
Spegnimento
17 aprile 2026 alle ore 19:11 UTC
Autore
Kamo
Impegno
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.

Tutte le modifiche

Come quello che vedi la spedizione?

Ognuno di questi aggiornamenti atterra automaticamente nello spazio di lavoro. Inizia gratis e guardalo crescere settimana dopo settimana.

Inizia gratis per sempreVisualizza il prezzo