I keep getting the below error when developing my ionic app. It's an authorization header not allowed by the backend.
Solutions tried:
open -a Google\ Chrome --args --disable-web-security --user-data-dir
but I still can't bypass cors check, the error persists. Need some help.
If you want to disable the CORS on chrome on mac you can run this command on your terminal/Item. it will open a new instance of chrome and all the tabs of this instance will have disabled the CORS. So you can run your application here for testing. I hope this you are doing just for testing your APIs and you know this is not a permanent fix. Also, remember this is disabling your web security. so I think this is a good option for testing your API when you are not worried about the security and you will have all the web security place when you are going to run your application on another environment like dev, and qa, and prod.
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
In terminal enter :
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With