Reputation: 1033
I have an ionic app that uses an iframe. The CORS options from the server allow an origin of ionic://localhost:8080 and I cannot change this. However, ionic uses localhost:8100 by default.
Can anyone tell me how I can tell ionic to use port 8080 by default when I'm running my app on a device, so the iframe src url will be allowed?
Upvotes: 1
Views: 1419
Reputation: 2863
According to Ionic's docs, it should be possible to do it like this:
ionic serve --port 8080
Change it in your package.json
for the start
script and it should work as intended.
If you want to run it on your mobile device, according to the docs, it should also be possible to do it like this.
ionic cordova run android --port 8080
Upvotes: 0