Reputation: 2542
The ASP.NET CORE application, when launched from visual studio, has the address https://localhost:44313/. To test the performance you need to make a tunnel. I use ngrok and the command:
ngrok http -host-header=localhost 44313
But this does not work for https.
Can anyone share a working example?
Upvotes: 17
Views: 32704
Reputation: 185
If u need to run multiple tunnels on a free-plan u can modify config as
version: "2"
authtoken: 2OS8VCciyOWXR7XM33rh6RY79jT_7u8VsgzzfwoewzGnfG3lV
tunnels:
first:
addr: 5173
proto: http
second:
proto: http
addr: https://localhost:7125
host_header: rewrite
schemes: [https]
and then run
ngrok start --all
to find config run
ngrok config check
Upvotes: 0
Reputation: 550
Update as March 2023.
After failing to get it running using all options above. I found the following from their documentation : https://ngrok.com/docs/secure-tunnels/tunnels/http-tunnels/#host-header
To tunnel http
e.g
ngrok http --host-header=rewrite http://localhost:44345
if using https, e.g
ngrok http --host-header=rewrite --scheme=https https://localhost:44345
Upvotes: 7
Reputation: 2542
Update 11 april 2019
Upvotes: 52
Reputation: 91
Now you have to put a -- before the host header
ngrok http https://localhost:{your-app-port} --host-header=localhost:"your-app-port"
Upvotes: 5
Reputation: 478
You can use Ngrok Extensions in visual studio. The tunneling process is very easy.
Upvotes: 0
Reputation: 580
Using ngrok version 2.3.29 and added authtoken (not sure if authtoken influences outcome, I've just added it following the online installation guide).
This command worked for me:
ngrok http https://localhost:{your-app-port} -host-header=localhost:{your-app-port}
Difference from existing answer: I pass localhost:port to -host-header
Difference form your question: I use ngrok http https://localhos:port
instead of ngrok http http://localhos:port
(https instead of http)
Upvotes: 13