Running Google Chrome without CORS (Cross-Origin Resource Sharing) is a common requirement for developers who need to test front-end applications against APIs that haven't yet configured permissive headers. While the "correct" way to fix CORS is on the server side, you can bypass these restrictions locally for development by launching Chrome with specific flags. OS-Specific Commands to Disable CORS To run Chrome without CORS, you must launch it via a terminal or command line while passing the --disable-web-security flag. All existing Chrome windows must be closed before running these commands for the flags to take effect. On Windows, you can use either PowerShell or the Command Prompt . You must also provide a unique --user-data-dir to prevent conflicts with your main browser session. Disable same origin policy in Chrome - Stack Overflow
To run Chrome without CORS (Cross-Origin Resource Sharing) restrictions, you can use the following methods. Keep in mind that disabling CORS can have security implications and should be used primarily for testing and development purposes. Method 1: Using Command Line Flags You can disable CORS in Chrome by running it with specific command line flags.
For Windows:
Open Command Prompt. Navigate to the directory where Chrome's executable is located. For a standard installation, you can use: cd C:\Program Files\Google\Chrome\Application run chrome without cors
Run Chrome with the following command: chrome.exe --user-data-dir="C:/Temp/ChromeDevTestUserDir" --disable-web-security
For macOS (using Terminal):
Navigate to the Applications folder or use Spotlight to find Terminal and run: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir="/tmp/ChromeDevTestUserDir" --disable-web-security All existing Chrome windows must be closed before
For Linux:
Open a Terminal.
Navigate to Chrome's directory (if necessary). Disable same origin policy in Chrome - Stack
Run Chrome with: google-chrome --user-data-dir="/tmp/ChromeDevTestUserDir" --disable-web-security
or if you have Google Chrome Beta or another version with a different name: google-chrome-beta --user-data-dir="/tmp/ChromeDevTestUserDir" --disable-web-security