CORS issues with Ionic 4 and iOS device

Hello,
I’m migrating my app to Ionic 4 and I’m getting CORS errors which didn’t happen with Ionic 3. In particular, console shows:
Origin ionic://localhost is not allowed by Access-Control-Allow-Origin.
And I changed the server headers with the following lines on PHP:

header("Access-Control-Allow-Origin: ionic://localhost");
header("Access-Control-Allow-Origin: http://localhost");

What else do I have to change? Or is it another issue? I’m using Angular’s HttpClient to connect to the server.
Thanks!

Which Http call u r using?

Angular http: this.http.post(this.loginUrl, body);
Body contains user and password.

u also need to run in desktop as well?

No, and I’m using other native plugins. But I also tried native http and I had some issues downloading files from the server with http native plugin (that download is done after receiving some information from the client, and I was using Angular HttpRequest for that, which I didn’t find in native Http).

Is it possibly a bug? I found this, which looks similar: https://github.com/ionic-team/capacitor/issues/2132

I’m using @ionic/angular 4.11.4 (which I updated today, by the way).