Repository navigation
feat(studio-channel): trust deco Editor's origin by default - #852
Merged
Merged
Conversation
… by default Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 8.23.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deco Editor (editor.decocms.com) frames a site's draft like Studio does, but the page's Studio channel only answers exact origins, so the editor's section wireframe and HTML swap never load there.
This adds
https://editor.decocms.comtoDEFAULT_STUDIO_ORIGINSin@decocms/blocks/protocol,@decocms/tanstackand@decocms/nextjs(the channel's trusted list and the CSP'sscript-src/frame-ancestors). A site that setsstudioOriginsorDECO_STUDIO_ORIGINis unchanged. The page still imports a module only from a URL on the origin of the message naming it, so the editor serves its own modules.Tests: the origin lists in the studio, csp, worker, DecoDocument and StudioBridge tests. READMEs and skills updated. The two failing
proxy.test.tstests and the compat-v7 lint warning fail on main too.🤖 Generated with Claude Code
Summary by cubic
Trusts deco Editor's origin (
https://editor.decocms.com) by default so its section wireframe and HTML swap load when it frames a site's draft. Adds the origin toDEFAULT_STUDIO_ORIGINSin@decocms/blocks/protocol,@decocms/tanstack, and@decocms/nextjs, which feeds the channel's trusted list and the CSP'sscript-src/frame-ancestors. Sites that setstudioOriginsorDECO_STUDIO_ORIGINare unchanged, and the page still imports modules only from the origin of the message naming them.Written for commit 5ee3578. Summary will update on new commits.