-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add explicit --cross-origin-isolation flag to flutter run.
#180026
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
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.
Code Review
This pull request introduces a new --cross-origin-isolation flag to flutter run, drive, and test commands. This allows developers to explicitly enable or disable Cross-Origin Opener Policy (COOP) and Cross-Origin Embedder Policy (COEP) headers on the web server. The default behavior is to enable these headers when wasm is used and disable them otherwise. The changes are well-implemented across the tool, including command-line parsing, debugging options, and the web asset server. I have one minor suggestion for code consistency.
mdebbar
left a comment
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.
Looks good, thanks for addressing this!
Fixes #163479
This adds a flag,
--cross-origin-isolation/--no-cross-origin-isolationthat allows the user to explicitly control whetherflutter run/drive/testserves files with COOP/COEP headers. If the user doesn't specify, it uses cross origin isolation when wasm is enabled and no cross origin isolation when wasm is disabled.