Angular 13 如何绕过 net::ERR_CERT_INVALID

问题描述 投票:0回答:1
 private baseUrl = 'https://diallosuer:8443/sprintproject';
  submitForm(form: FormGroup) : Observable<HttpEvent<any>>  {
    
    let dataJson = JSON.stringify(form.value);
    const httpOptions = {
      headers: new HttpHeaders({'Content-Type': 'application/json',
      "rejectUnauthorized": 'false',
    }),
    }
    
   
      const req = new HttpRequest('POST', `${this.baseUrl}/adduser`, dataJson,httpOptions);
      return this.httpClient.request(req);
   
   
  }
angular spring-boot ssl-certificate
1个回答
0
投票

不能,您的 ssl 证书无效。您可以使用

http
而不是
https
来跳过 ssl,但这并不是一个实际的解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.