如何强制 ngrok 转发到 http 而不是 https?

sag*_*ing 5 portforwarding endpoint ngrok

ngrok 只为我转发到 https,当其他服务尝试访问端点时,这会给出 ssl 证书错误。

大多数时候,ngrok 会转发到 httphttps,但由于某种原因,我的 ngrok 在使用以下命令后才转发到 https:ngrok http 4554 --host-header=localhost:4554

如何强制 ngrok 转发到 http 而不是 https?

sag*_*ing 13

要转发到 http,您需要使用 schema 标志,如下所示:

ngrok http --scheme=http 4545 --host-header=localhost:4545
Run Code Online (Sandbox Code Playgroud)

这将指定 ngrok 转发到 http,并且生成的端点将是 http 而不是 https。