ngrok https host-header causing redirecting to localhost

355 views Asked by At

Pretty new to using ngrok. I'm trying to use it in order to expose my localhost site to the web, in order to test a 3rd-party plugin. Note that our site requires https, so I cannot use ngrok in normal http mode. If I run ngrok http https://localhost:[MyPort] --domain [MyNgrokDomain], it starts up properly, and displays the appropriate Forwarding line, however, navigating to the site yields a 400 Invalid Hostname error.

I'm able to correct that by changing my command to ngrok http https://localhost:[MyPort] --domain [MyNgrokDomain] --host-header localhost:[MyPort]. Now, the URL resolves, however, it automatically redirects it to https://localhost:[MyPort]. This works locally, but of course, fails everywhere else.

Any suggestions are appreciated. Thanks!

0

There are 0 answers