I have two apps, one hosted on DigitalOcean under api.exampledomain.com and one hosted on Vercel under exampledomain.com I am trying to trigger a webhook that is on my main domain from my subdomain. But I get the following error:
request to https://exampledomain.com/api/revalidate failed, reason: Hostname/IP does not match certificate's altnames: Host: exampledomain.com. is not in the cert's altnames: DNS:api.exampledomain.com
When I test the trigger on my subdomain(api.exampledomain.com) it works with sites like these webhook.site. And when I try using the real webhook(on exampledomain.com) using Postman it works, this on localhost of course. So the error only happens when I call the webhook(on exampledomain.com) from the subdomain(api.exampledomain.com).
The certificates on api.exampledomain.com are created by Let's Encrypt, and proxied using NGINX.
- I tried setting CORS headers to '*', but that did not fix it.