Site icon Narayana Tutorial

How to disable CORS in Google Chrome

google-chrome-browser

google-chrome-browser

How to disable CORS in Google Chrome

While accessing your application from the Google Chrome browser, the application internally interacting with other application’s API via scripting languages like Javascript, AJAX, ReactJs, NodeJs, etc… then you might be seen the Request Blocked due to CORS Policy in the browser console. You can open the Google Chrome Browser console by pressing the F12.

 

 

 

Start Google Chrome by Disabling CORS

Press the Windows+R, then enter the following command.

Syntax:

<chrome-Installation-location or chrome app name> –disable-web-security –disable-gpu –user-data-dir=~/chromeTemp

Here chrome-Installation-location is C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe –disable-web-security –disable-gpu –user-data-dir=~/chromeTemp

Press Windows+R, then paste the above command, and then click on OK. then the google chrome browser opened with disabled CORS.

 

Here chrome Installation application name is: chrome.exe

chrome.exe –disable-web-security –disable-gpu –user-data-dir=~/chromeTemp

Press Windows+R, then paste the above command, and then click on OK. then the google chrome browser opened with disabled CORS.

Chome-CORS-Disable-Command