Repository navigation
Let Smartlinks serve interactive browser apps safely - #116
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
Smartlink HTML responses were deliberately inert: the fixed response CSP blocked browser JavaScript, remote resources, connections, frames, embedding, and external form targets. That prevented useful small browser apps even when the capability affected only the artifact and its visitor.
Solution
Run every authored response in a mandatory opaque-origin CSP sandbox, then make external browser boundaries explicit, authenticated artifact policy.
--allow-*flags,--referrer, and--corsconfigure external scripts, connections, subresources, frames, forms, embedding, referrer disclosure, and credential-free CORS forbuild,run, andrun --serve.ctx.compileaccepts the same typedbrowserpolicy andcors: true. Children choose their own policy rather than inheriting it.interstitial: false.decode, previews, and interstitial facts expose it.run --serveuses an unguessable per-session path so local browser requests cannot force execution through the loopback server.allow-same-origin, cookies, persistent storage, or service workers on the shared runtime origin.This keeps policy authorial without giving one Smartlink browser authority over another.
Verification
npm run checkembeddableBy: ["all"].Closes #105
Closes #113
Closes #114