• Aran Donohue's avatar
    Support --web-header option for flutter run (#136297) · 48eee14f
    Aran Donohue authored
    Adds support for a new --web-header option to flutter run.
    
    Creates a workaround for https://github.com/flutter/flutter/issues/127902
    
    This PR allows adding additional headers for the flutter run web server. This is useful to add headers like Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy without the use of a proxy server. These headers are required enable advanced web features. This approach provides flexibility to the developer to make use of the feature as they see fit and is backward-compatible. One tradeoff is that it increases the surface area to support for future changes to the flutter web server.
    
    https://github.com/flutter/flutter/issues/127902 is not fully addressed by this change. The solution for that task will be more opinionated. This PR creates a general-purpose workaround for anyone who needs a solution sooner while the bigger solution is developed.
    48eee14f
resident_web_runner.dart 23.8 KB