连接隧道时如何设置路径?

问题描述 投票:0回答:1

启动

ngrok
隧道时,它需要端口、主机或主机的子域。示例:
ngrok http localhost:8000
.

我想将隧道指向/绑定到主机上的特定路径,而不是端口或主机。这样

localhost:8000/webhook
。我尝试了一下,看来是不可能的。有没有其他方法可以做我想做的事?

ngrok
1个回答
0
投票

您应该使用以下命令:

ngrok http -host-header=rewrite YOUR-LOCAL-DOMAIN:PORT

所以,以你的例子:

ngrok http -host-header=rewrite localhost:8000/webhook

它应该可以完成这项工作。

© www.soinside.com 2019 - 2024. All rights reserved.