-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use postMessage in embed mode instead of custom events #9981
Use postMessage in embed mode instead of custom events #9981
Conversation
fe87b31
to
825ef82
Compare
I think the Sonarcloud comments are actually legit. I'm just not sure where we want to retrieve this information from |
@dschmidt I guess we need to introduce new prop in config for that then? Should |
Not sure, on the one hand that's kind of an invitation to not configure it properly... on the other hand if CSP is configured properly it should be rather safe anyhow |
825ef82
to
f033b4d
Compare
I still added it. I don't think there is any way we can secure the value ourselves as it will always depend on the deployment. Regarding not configuring it properly, I guess this is a danger we can live with? And even if the CSP would handle it, as long as it is best practice, I would set it anyway 🤷 |
My point is: having |
I agree since there is no other default value that would make sense. Maybe we also should move the |
98c1fa3
to
519d33e
Compare
@dschmidt now I get it, there was a bit of a misunderstanding from my side. Default is dropped now and it is configurable. @JammingBen changelog items updated to include the link and dropping the changes and also the mode prop moved to embed group. |
a59f3ab
to
8506fce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests still fail, code LGTM though 👍
8506fce
to
f90d698
Compare
Strange that the E2E tests are failing as it seems unrelated to my changes... I'll try to see what's going on |
Could you try rebasing with current master? |
f90d698
to
cbf9102
Compare
Kudos, SonarCloud Quality Gate passed! |
Use postMessage in embed mode instead of custom events
Description
We have switched to using
postMessage
method in the embed mode instead of emitting custom events. This mitigates the issue when running the embed mode on different origin blocked the access to thedispatchEvent
method.Motivation and Context
Solve issues with forbidden access when hosting the iframe on different origin.
How Has This Been Tested?
Types of changes
Checklist: