I am trying to send a POST request
for the react app hosted on firebase to the API built using express.js
and firebase
cloud functions.
when I try to send a request it fails with an error message:
POST "Request URL" net::ERR_CERT_COMMON_NAME_INVALID
when I searched for the error I came to know (maybe) that this issue is related to the SSL
certificate. I am not using any custom domain both the URL of API and web app is provided by firebase
and have the SSL certificate
.
Here's the error image:
The API works fine when tested with the postman.
Also, the error is the same for both the localhost and the URL provided by the firebase. PS: I am using Axios to send the post request.
Please help!! any hint will be helpful. Thank you.
Are you manually setting the Cloud Function URL? That www
at the beginning should not be there.