[Fixed] Angular outside service custom cert ERR_BAD_SSL_CLIENT_AUTH_CERT


I have to connect by Angular 11 to outside service with custom certificate. Client send me certificate, I tested it in postman (add .crt and .key files) and all requests works fine.
Problem start on Angular and https request. I get error response in console:


I can’t find answer where add content from files .crt and .key below piece of my code.

export class RestConnectionService {

  constructor(private httpClient: HttpClient) {

  public send(queryBody: InputAuthBody): Promise<any> {
    return this.httpClient.post(AppSettings.API_URL + 'XXX', queryBody).toPromise();


I had to do connection server to server. nginx with reverse proxy solve my problem nginx conf code part to add cert:

 location /XXXX/XXXX {
        proxy_ssl_certificate        /etc/nginx/certs/XXX.crt;
        proxy_ssl_certificate_key    /etc/nginx/certs/XXX.key;

        proxy_pass   https://XXX:port/XXXXX/XXXX;

Leave a Reply

(*) Required, Your email will not be published