【发布时间】:2019-07-14 23:30:19
【问题描述】:
当从 Visual Studio 启动时,ASP.NET CORE 应用程序的地址为 https://localhost:44313/。 要测试性能,您需要制作隧道。我使用 ngrok 和命令:
ngrok http -host-header=localhost 44313
但这不适用于 https。
谁能分享一个工作示例?
【问题讨论】:
标签: asp.net-core https ngrok
当从 Visual Studio 启动时,ASP.NET CORE 应用程序的地址为 https://localhost:44313/。 要测试性能,您需要制作隧道。我使用 ngrok 和命令:
ngrok http -host-header=localhost 44313
但这不适用于 https。
谁能分享一个工作示例?
【问题讨论】:
标签: asp.net-core https ngrok
2019 年 4 月 11 日更新
【讨论】:
使用 ngrok 2.3.29 版本并添加了 authtoken(不确定 authtoken 是否会影响结果,我只是按照在线安装指南添加的)。
这个命令对我有用:
ngrok http https://localhost:{your-app-port} -host-header=localhost:{your-app-port}
与现有答案的区别:我将 localhost:port 传递给 -host-header
与您的问题不同:我使用 ngrok http https://localhos:port 而不是 ngrok http http://localhos:port(https 而不是 http)
【讨论】: