# iOS internet accessc

**URL:** <https://forum.ionicframework.com/t/ios-internet-accessc/223982>\
**Category:** Capacitor\
**Created:** [June 7, 2022, 9:01pm UTC](https://forum.ionicframework.com/t/ios-internet-accessc/223982 "2022-06-07T21:01:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farruggia](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@Farruggia](https://forum.ionicframework.com/u/Farruggia)\
**Post date:** [June 7, 2022, 9:01pm UTC](https://forum.ionicframework.com/t/ios-internet-accessc/223982/1 "2022-06-07T21:01:42Z")

</div>

Hi all.  
I’m trying to deploy the app on iOS device.  
The same app is working fine on Android.

When I run the app on the device, it is displayed properly.  
I suppose the problem is that it is not able to get access internet.

In the info.plist, the key `Allow Arbitrary Loads` is True.

When I try to do a request via axios, I got this error.

`Failed to load resource: Origin capacitor://localhost is not allowed by Access-Control-Allow-Origin.`

In the server side, CORS is enabled.

Please could you help me?  
Thanks

---

<div class="post-metadata">

**Author:** ![thomasvidas](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/thomasvidas/32/137760_2.png) [@thomasvidas](https://forum.ionicframework.com/u/thomasvidas)\
**Post date:** [June 8, 2022, 1:12am UTC](https://forum.ionicframework.com/t/ios-internet-accessc/223982/2 "2022-06-08T01:12:57Z")

</div>

I would double-check to make sure that `capacitor://localhost` is properly [added to your server’s CORS config](https://ionicframework.com/docs/troubleshooting/cors). If you are unable to change these settings on the server, you could look at options such as `@capacitor-community/http` or `cordova-plugin-advanced-http`.

---

<div class="post-metadata">

**Author:** ![Farruggia](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@Farruggia](https://forum.ionicframework.com/u/Farruggia)\
**Post date:** [June 8, 2022, 8:42am UTC](https://forum.ionicframework.com/t/ios-internet-accessc/223982/3 "2022-06-08T08:42:05Z")

</div>

In the server, CORS accepts all connections [\*], `capacitor://localhost`should be allowed too.  
I am using a third-party API and I get the same error.  
Consider also that all my requests are https.  
🤔

---

<div class="post-metadata">

**Author:** ![Farruggia](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@Farruggia](https://forum.ionicframework.com/u/Farruggia)\
**Post date:** [June 8, 2022, 6:04pm UTC](https://forum.ionicframework.com/t/ios-internet-accessc/223982/4 "2022-06-08T18:04:04Z")

</div>

I’ve added the domain in capacitor.config.ts

```auto
const config: CapacitorConfig = {
...
, server: { allowNavigation: ["mydomain.com"] }
....
}

```
