all other tutorials do not address this issue, they just build stuff on same domain and go in circles and never fix this issue, but Negar in less than 10 minutes was able to show a practical solution and actually works.
What if you have an application that needs to make request from multiple different applications? This looks like it would only work for a single external api....
Thank you ... helped me a lot for testing ... I use expressjs on backend .... so one has also to look at cors settings for expressjs to get the build version running ';-)
I am continuously getting Error :The connection to ws://192.168.2.106:8080/sockjs-node/450/hhuu0ii4/websocket was interrupted while the page was loading. app.js line 2519 > eval:1684:9 On console
Thank you, it fixed my problem when in dev environment (npm run serve), but I still have a problem after building the project (npm run build), Can u help me?
Thank you for this video. I followed your tutorial. But after I change the code according to the way you have mentioned, I get a 404 error for the api url. My client is running on 127.0.0.1:8010. When I changed my base url of the api to 127.0.0.1:8010/users, I get a 404 error. This worked fine when I had my other client application running on the localhost:8080. This there some issue with 127.0.0.1:8010 specifically. The above code works just fine for another application. The only thing that changed was the client url (where the app is hosted).
This is working fine for development instance. But i'm getting the same CORS error after hosting to the github page ( Please note that i tried to change the base URL to the github host link for the app ). Can anyone please help on this.