Ngrok hostname SSL Certificate
You expose your service through the URL *.ngrok.com. A browser or other client will make a request to *.ngrok.com. The certificate presented there must be valid for *.ngrok.com. If *.ngrok.com presents a certificate for example.com, any valid HTTPS client would reject it because the names do not match, which by definition makes it an invalid certificate and is a flag for a potential security problem, exactly what HTTPS is designed to mitigate.
If you want to present your certificate for example.com to the client, you need to actually host your site at example.com
I am running a Flask API application, and I have an SSL Certificate.
When I run flask server on localhost the certificate is applied from Flask successfully.
But when I use Ngrok to deploy the localhost on a custom domain, the certificate is changed to *.ngrok.com, how can I change that to my certificate?.
EDIT #1:
I already have a certificate for the new hostname and I have already applied it on Flask, but ngrok is changing it.