-
-
Notifications
You must be signed in to change notification settings - Fork 374
fix(runtime): use document.defaultView to get real window object to solve csp issue #3163
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
Conversation
🦋 Changeset detectedLatest commit: b5c9917 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Summary
This pull request fixes a runtime issue by using document.defaultView to get the real window object, which helps solve a CSP (Content Security Policy) issue. The change ensures the correct global object is used, particularly in cases where the code is running in a sandbox environment. The pull request includes updated tests and documentation, ensuring the fix is thoroughly tested and documented.
File Summaries
| File | Summary |
|---|---|
| packages/runtime/src/global.ts | The code changes introduce a fix to use document.defaultView to get the real window object, which helps solve a CSP (Content Security Policy) issue. This change is made to ensure the correct global object is used, particularly in cases where the code is running in a sandbox environment. |
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.
Incremental Review
Comments posted: 4
Configuration
Squadron Mode: essential
Commits Reviewed
f7791881772a7e7dfd21508a13fcb9190e21b6c3...b5c9917ffba7da12fb175dfdee5adcfa0ddf1e18
Files Reviewed
- packages/runtime/src/global.ts
Files Ignored
These files were ignored due to the filter in the squadron.yaml file.
- .changeset/cyan-emus-prove.md
Description
use document.defaultView to get real window object to solve csp issue
Related Issue
#3108
Types of changes
Checklist