Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): state the playground page's own framing headers (#5532)

Baraa Hamodibaa01b1c2535
diff --git a/apps/docsite/next.config.mjs b/apps/docsite/next.config.mjs
index 7e73c3f92e..231666db9c 100644
--- a/apps/docsite/next.config.mjs
+++ b/apps/docsite/next.config.mjs
@@ -21,6 +21,17 @@ const nextConfig = {
// the site itself loads (Google Fonts, Vercel analytics).
async headers() {
return [
+ {
+ // The playground page itself also refuses embedding: today the
+ // nested preview's own frame-ancestors already breaks any embedding
+ // chain, but that protection shouldn't hinge on a child frame's
+ // headers — the parent states it directly.
+ source: '/playground',
+ headers: [
+ {key: 'X-Frame-Options', value: 'SAMEORIGIN'},
+ {key: 'Content-Security-Policy', value: "frame-ancestors 'self'"},
+ ],
+ },
{
source: '/playground/preview',
headers: [