Tuesday, 14 March 2017

Angular2: make the browser call an api on a subdomain

I serve a angular2 webapp from mysite.com

My webapp is making calls from the browser to a nodejs backend.

For the moment I use mysite.com/api/ to call the api.

For system architecture reasons, I wish to call the api a different way, by using a subdomain:

api.mysite.com/

How can I get rid of the cross-origin issue?



via Vincent Teyssier

No comments:

Post a Comment