How to make https calls in ionic

I’ve written my API in node JS and hosted it on AWS with a SSL certificate, I’m trying to call those APIs from ionic using HTTPClientModule and it doesn’t work.

Things I’ve tried,

  1. used cordova plugin advanced http, didn’t work.
  2. on platform.ready() I added setSSLCertMode(“pinned”), didn’t work.

This problem occurs only in release build.

Used http://ivancevich.me/articles/ignoring-invalid-ssl-certificates-on-cordova-android-ios/ to make it work but it says not to use this approach in production, need help.

Try using Sentry to understand what is happening at runtime.