append ancestorOrigins and baseOrigin to renderer URL. - #165
Open
jgindin wants to merge 3 commits into
Open
Conversation
The entire chain is necessary in case of multiple framings.
Contributor
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the RenderedFrame component to append both the parent and all ancestor origins to the renderer URL query parameters to prevent unauthorized cross-site framing, while deduplicating them. It also adds comprehensive unit tests for these scenarios, including SSR and Firefox environments. The review feedback suggests accessing ancestorOrigins using computed property syntax with a string literal to prevent TypeScript compilation errors and avoid minifier mangling.
Uses computed property syntax `['ancestorOrigins']` with `any` cast to prevent TypeScript compilation errors, as `ancestorOrigins` is not on the standard Location interface. This also prevents JS optimizers such as Closure Compiler or Terser from mangling or renaming the property during production builds.
Replace any cast with explicit structural typing using DOMStringList. Maintains string literal computed property access to protect against minifier property mangling while removing the need for ESLint any suppressions.
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.
Description
The entire chain is necessary in case of multiple framings.
Pre-launch Checklist