I have a problem with public NASA layer wms, this is my simple code:
Solved! Go to Solution.
This is your web browser basically acting as designed: you can load your app from domain1 and reach out to domain2. It’s a security thing..
To temporarily disable such behavior, just to see that your code works, you can use chrome by running it from the command line like this:
chrome.exe —disable-web-security —user-data-dir=c:\temp
then open your app.
For a more permanent solution you need to configure your web server where your app is deployed to allow cors.
There is also the proxy option, where you place a proxy app on the server to route all calls; that way your client only talks to your webserver so you avoid cors altogether.
This is your web browser basically acting as designed: you can load your app from domain1 and reach out to domain2. It’s a security thing..
To temporarily disable such behavior, just to see that your code works, you can use chrome by running it from the command line like this:
chrome.exe —disable-web-security —user-data-dir=c:\temp
then open your app.
For a more permanent solution you need to configure your web server where your app is deployed to allow cors.
There is also the proxy option, where you place a proxy app on the server to route all calls; that way your client only talks to your webserver so you avoid cors altogether.