ERR_INSECURE_RESPONSE

In my angular2 app I making a HTTPS post request to the API:

this.http.post('https://myhost.com/api/users/sign_in', body, { headers: contentHeaders })
      .subscribe(
      response => {.....

And I am getting “failed to load resource: net::ERR_INSECURE_RESPONSE”

Everything was fine with HTTP until I switched to HTTPS.

I am using self signed certificate for myhost.com.

In browser I am able to accept the certificate and make a request to the API. Could I resolve this also to make an API request via http.post from angular2 directly?

Leave a Reply

avatar
  Subscribe  
Notify of