当我使用ngrok
并使用以下配置运行ngrok给出的url时:
- 我的本地url是:
localhost:8080/someexample
- 我的
ngrok
url是:http://f07d0862.ngrok.io/
它显示如下错误:
Bad Request - Invalid Hostname HTTP Error 400.
当我使用ngrok
并使用以下配置运行ngrok给出的url时:
localhost:8080/someexample
ngrok
url是:http://f07d0862.ngrok.io/
它显示如下错误:
Bad Request - Invalid Hostname HTTP Error 400.
由于主机名不同,您的Web服务器正在拒绝该请求。
请尝试 ngrok http -host-header="localhost:8080"
。
-host-header="localhost:8080"
。 - moritzg--host-header="localhost:8080"
。 - Holistic Developer这就是您想要的解决方案。
ngrok http 8080 -host-header="localhost:8080"
ngrok http -host-header=localhost 8080
对我来说,这是这样的
ngrok.exe http https://localhost:44315 --host-header=localhost:44315
如果使用 -o 标志出现错误,请尝试使用双--
ngrok http 8080 --host-header="localhost:8080"
也许你应该关闭防火墙。
这对我有用。