Release build and failing https requests

Hi, iam facing an issue with deployment of my app. My app uses some http and https requests to get data from server. When i go with only --prod build, everything works fine. But when i build app with --release --prod, the https request doesnt work. Any solution to this? There must be some problems with certificate on the server - it is self-signed, so it is considered invalid. Any ideas how to fix this? What about http.AcceptAllCert() method?

iam a little confused about this certificates and how should i change my app to accept them.