0

I have a Post API call which is working fine in Postman with certificate(CRT and Key file).

While calling this api from frontend, I am getting 'HttpErrorResponse' error on browser.

Do i need to consider certificate(CRT and Key file) at frontend while making the API call? Below is the error while making http call in Angular

[Error] XMLHttpRequest cannot load <url> due to access control checks.
"error": "[ProgressEvent]", 
"headers": "[ti]", 
"message": "Http failure response for https://....b/files: 0 Unknown Error", "name": "HttpErrorResponse", 
"ok": false, 
"status": 0, 
"statusText": "Unknown Error", 
"url": "https://...b/files"

While checking the log from backend side

SSL_do_handshake() failed (SSL: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:SSL alert number 46) while SSL handshaking, client: <IP>, server: <IP>

How to fix this issue in Angular or server side?

4
  • this issue is called CORS and should be resolved on server side by configuring CORS. Commented Nov 8, 2023 at 22:36
  • I tried CORS related fix. But not working. looks like cert issue on server side Commented Nov 8, 2023 at 23:10
  • Does the domain have a valid certificate? That seems to be the issue, not CORS. Commented Nov 9, 2023 at 8:18
  • So there are 2 API services. One is actual service with API secret key auth, another is backend for frontend (bff) service which is calling actual service with key. So from frontend i don't need api key auth passed, and I am calling bff service. both services are working fine on postman with CRT and Key certificates but while calling bff from FE, getting this error. so not sure it's FE or BE issue. Commented Nov 9, 2023 at 14:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.