Livereload CORS strange behavior


#1

I’m trying to develop using --livereload with Ionic + iOS emulator on mac OSX, and seeing CORS errors whenever making a request to an external API.

I set up a service proxy per https://ionicframework.com/docs/cli/configuring.html#service-proxies and I’m seeing:

Origin is not allowed by Access-Control-Allow-Origin. http://localhost:8100/api/

I need to make requests from localhost to my service proxy (also localhost). Not sure what I’m doing wrong or why my requests are being made from my external IP.

Any advice is appreciated, thanks!


#2

If anyone stumbles on this, I needed to use the --local flag when running ionic cordova run