Fix visual-mode iframe blocked by X-Frame-Options: DENY

The global _headers rule set DENY for all paths, preventing the
/visual-mode/ page from embedding /antipattern-examples/ in an iframe.
Add a path-specific SAMEORIGIN override for /antipattern-examples/*.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-04-09 08:08:04 -07:00
co-authored by Claude Opus 4.6
parent e7afda2c55
commit e284ef882b
+4
View File
@@ -503,6 +503,10 @@ function generateCFConfig(buildDir) {
/antipattern-images/*
Cache-Control: public, max-age=604800, stale-while-revalidate=86400
# Antipattern examples: allow same-origin framing (visual-mode page embeds these)
/antipattern-examples/*
X-Frame-Options: SAMEORIGIN
# Root static assets (favicon, og-image, etc.)
/favicon.svg
Cache-Control: public, max-age=604800, stale-while-revalidate=86400