Capacitor 6 - Axios Network Error

Thank you for explaining CapacitorHttp! I’ll remove that since we use our own server.

I added %r{^http://192\.168\.\d{1,3}\.\d{1,3}:3000$} to the origins array and it worked :tada:
I can’t believe it was such a simple oversight..

One more thing I wanted to confirm, you mentioned in another post that we have to add the following to the production, and staging in our case, CORS origins array for it to work.

  • iOS: capacitor://localhost
  • Android: http://localhost

I made a release build on an iOS simulator and indeed got capacitor://localhost in window.location.origin. Is it still the case? Is there any way for us to change or specify the origin when making a release build? Also, I didn’t find this origin specification in the docs, it would be great if this could be mentioned there in the setup section.

1 Like