TypeError: Load Failed on Apple check

Hello,

I am new to Ionic and have just finished my first application. I managed, not without difficulty, to send it to the Apple Store. After a check, the Apple team refused me the application because they can’t connect to the application. The problem it runs into is “TypeError: Load Failed”. I have NEVER encountered this problem on any of my test phases before.

I had a lot of trouble reproducing the problem. I managed to reproduce it using a VPN. So I suspect that my API CORS is not letting the VPN through. Maybe the problem comes from somewhere else? I use fetch to call the API.

What can I do? I use the npm cors package for my server.

Thank you for your help, I feel desperate

I have tried to change the port to 443 as seen on the internet for HTTPS but that doesn’t work.

After some research, I realised the following:

The preflight sends me a 204 response with the OPTIONS method
The POST request returns a status code 307

So I think there is a config on my NodeJS API that must be a problem with the VPN, but I can’t figure out what is wrong.