How to use https to make the requests?

I am building an application. I embed a script using renderer2. This code is an iframe and it makes some calls. This calls must use https, but actually, they are being done this way capacitor://localhost, so the iframe is not working. I have tried to use localtunnel (GitHub - localtunnel/localtunnel: expose yourself) to try the app in the browser and it works. But when I try to use the app on a real device it does not work.

Do you have any idea ?