Ionic Capacitor iOS cors issue - Oddly iOS mobile devices only?

I have had a search of the forum but can’t find a post which outlines exactly the same issue as I’m finding. Apologies if I’m repeating.

I’ve built a Capacitor app using @angular/common/http for api calls. All calls work in Android & web. On PC and on Mac Safari. But when I try to run both the web version and the iOS native app on my iPad the api calls fail with “origin https://MYSITE is not allowed by access-control-allow-origin”

My allowed origins in my back end contain:

'http://localhost:8100',
'http://localhost:8200',
'https://MYSITE,
'capacitor://localhost',
'http://localhost'; 

Does anyone have a similar experience with their app in iPad or can anyone offer any clues to a resolution?

Kind regards.

Hello,

does it work if you set the CORS header on your server to *?
You can also try to place https://corsproxy.io/? in front of your API endpoint and try if it works. The URL should look like this: https://corsproxy.io/?https://MYSITE

Regards,
Marius

Sorry. I forgot to mark this as solved. Although I could login on Android app, Android browser, browser on PC and Mac login on iOS app and iOS Safari failed. I debugged the entire login script. It was only failing on iOS. Turns out when returning false iOS return a cors error. I changed the login script slightly and ask was solved. So it wasn’t actually a cors issue even though the error was showing as one.

Hello,

the same thing is happening to me and I don’t know how to solve it. I thought it was a CORS problem, since the error marks it like that, but I find it strange that the app works on all devices except the iphone. Could you help me? Please.

Thanks in advance,
Regards.