Skip to content

Instantly share code, notes, and snippets.

@muth0mi
Last active August 1, 2025 17:04
Show Gist options
  • Select an option

  • Save muth0mi/b1b27cf117a7e91d5c8e8a5e3695ee2a to your computer and use it in GitHub Desktop.

Select an option

Save muth0mi/b1b27cf117a7e91d5c8e8a5e3695ee2a to your computer and use it in GitHub Desktop.
Launch Chrome With Disable Web Security

Launch Chrome with Disabled Web Security

Cross-Origin Resource Sharing (CORS) errors are a common frustration for web developers. These errors happen when a webpage tries to access resources from a different domain, protocol, or port than its origin, and the server doesn't permit it. This can significantly impact local development and testing.

A quick workaround is to launch Chrome with web security disabled.

On macOS, you can use the following command in your terminal:

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security

On windows, run the following command in Command Prompt or PowerShell:

"[PATH_TO_CHROME]\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=%LOCALAPPDATA%\Google\chromeTemp

On linux, use:

google-chrome --disable-web-security

This launches a new Chrome instance with a temporary profile, bypassing CORS restrictions.
Remember, this is strictly for development and testing; never use this in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment