Skip to content

Conversation

@eyebrowsoffire
Copy link
Contributor

@eyebrowsoffire eyebrowsoffire commented Dec 17, 2025

Fixes #163479

This adds a flag, --cross-origin-isolation/--no-cross-origin-isolation that allows the user to explicitly control whether flutter run/drive/test serves 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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 17, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link
Contributor

@mdebbar mdebbar left a 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!

@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 18, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Dec 18, 2025
Merged via the queue into flutter:master with commit f804fb5 Dec 18, 2025
141 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optionally disable COEP/COOP headers from run command in WASM builds

2 participants