How To Disable Cors Headers In Browser & What is Cors & Why to Disable?


what is Cors & Why?


I use this sometimes, for posting a local host fronted app to a local host backend API. I created a separate shortcut on my Windows 10 laptop, so that it never is used for normal browsing, only for debugging locally.
 r

How To Disable Cors Headers In Browser:

The Following command can perform in terminal. Open terminal and enter the respected command and its automatically open Browser.

OSX

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

Linux

google-chrome --disable-web-security

If you need access to local files for dev purposes like AJAX or JSON, you can use -–allow-file-access-from-files flag.

On Windows 10 command will be:


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


Comments

Popular posts from this blog

ERR: error parsing query: found influx, expected SELECT, DELETE, SHOW, CREATE, DROP, EXPLAIN, GRANT, REVOKE, ALTER, SET, KILL at line

How To Convert Html File/URL/String Into Image Using Python

How to get Full URL or get absolute url In Django