I want to send a post request from my Node server to a https url like this:
fetch(url, {
method: 'post',
})
.then(response => {
console.log(response);
}).catch(error => console.log(error));
No matter if I use axios or fetch I cannot because each time I get this error:
Hostname/IP does not match certificate's altnames: Host: google.com. is not in the cert's altnames: DNS:amazeservice.net, DNS:www.amazeservice.net
- I'm using CloudFlare and it's SSL
- This is not happening in localhost
I can't find the solution in my case because I used CloudFlare's ssl.
How to fix or debug this ssl error?