0

I'm working on a web-app which talks to a few API's. All of those API's has CORS rules, one of which is to allow origin localhost:xxxx.

I have now come across a bug on mobile and have installed Genymotion to emulate my web-app on a mobile device.

I have no problem accessing localhost on my host machine, the problem is that the calls from the emulator has a different origin than localhost:4200.

My question is: Is it possible to route all traffic through my hostmachines localhost to make it look like I'm calling from localhost?

I'm guessing this is a configuration made in VirtualBox?

Thanks in advance!

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
kodeaben
  • 1,829
  • 3
  • 24
  • 33

1 Answers1

0

no need to configure virtualbox, just use local ip or server ip which you use, and check your server port for open in the phone too.. thats all.. for example you using wampserver; it something "http://192.168.1.123/sitename" or "http://192.168.1.123:8080/sitename"

Umut Bulut
  • 94
  • 1
  • 7