当我使用ngrok
& 运行 ngrok 给出的 url 时,配置如下:
- 我的本地网址是:
localhost:8080/someexample
- 我的
ngrok
网址是:http://f07d0862.ngrok.io/
它显示此错误:
Bad Request - Invalid Hostname HTTP Error 400.
当我使用ngrok
& 运行 ngrok 给出的 url 时,配置如下:
localhost:8080/someexample
ngrok
网址是:http://f07d0862.ngrok.io/
它显示此错误:
Bad Request - Invalid Hostname HTTP Error 400.
您的 Web 服务器拒绝该请求,因为它具有不同的主机名。
尝试ngrok http -host-header="localhost:8080"
这是您想要的解决方案。
ngrok http 8080 -host-header="localhost:8080"
This worked for me:
ngrok http -host-header=localhost 8080
可能是你应该关闭你的防火墙。
这对我行得通。