Overview
flutter_cors is a utility package that allows developers to temporarily disable and re-enable CORS (Cross-Origin Resource Sharing) checks in Flutter's Chrome instance during development. It is particularly useful when testing web applications that interact with external APIs or services that don’t support CORS headers. The package provides a simple script interface to modify the Chrome browser’s behavior without requiring manual configuration changes. It runs on macOS, Windows, and Linux, making it accessible across major development platforms.
Use cases
- Testing web apps with external APIs
- Bypassing CORS during local development
- Debugging cross-origin requests
- Simulating production-like API interactions
- Enabling rapid frontend-backend integration
Key features
- Disables CORS checks via script
- Re-enables CORS after use
- Cross-platform support (macOS, Windows, Linux)
- Simple command-line integration
- Minimal setup required
Suitable for
- Frontend developers testing web apps
- Teams working with third-party APIs
- Developers debugging CORS-related issues
- Local development environments
- CI/CD pipelines with web testing
Considerations
- Not for production use
- Requires manual script execution
- May pose security risks if misused
- Only affects Flutter's Chrome instance
- Should be used cautiously in shared environments