I am trying to call an API from a self-issued cert site.
constructor(private http: HttpClient) {
this.http.get('https://sample.com/test').subscribe(() => {
// Do something
});
}
But I get the following:
GET https://sample.com/test net::ERR_CERT_AUTHORITY_INVALID
The current workaround is to open https://sample.com/test in another tab and proceed with invalid cert, and refresh my app. Then I am able to continue. However, what I need is to automatically ignore this invalid cert and proceed. Please advise.