2

When I turn off security entirely in Chrome, it has no effect.

Safari has similar option, it does it.

I would get no CROS error during development of the frontend web app.

I would do it from GUI not from terminal starting with some exotic option. Not like this: Disable same origin policy in Chrome

enter image description here

enter image description here

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
János
  • 32,867
  • 38
  • 193
  • 353

1 Answers1

1

To solve the issue, you have the following options:

  1. Deploy the app on the same server or domain as the service that you want to call, so that both resources are in the same origin (if possible)

  2. Set the CORS-relevant response headers on the remote system (if possible)

  3. Disable the same-origin policy in the browser for local testing

  4. In Google Chrome, you can easily disable the same-origin policy of Chrome by running Chrome with the following command: [your-path-to-chrome-installation-dir]\chrome.exe --disable-web-security --user-data-dir. Make sure that all instances of Chrome are closed before you run the command. This allows all web sites to break out of the same-origin policy and connect to the remote service directly.

Refe: This link