Reputation: 103
When I start an HTTP tunnel, ngrok automatically starts forwarding on both HTTP and HTTPS. Is there a way to only start one of them?
Upvotes: 10
Views: 25339
Reputation: 337
You'll need to set the bind-tls
option in your ngrok config.
--bind-tls "true"
Docs here: https://ngrok.com/docs#http-bind-tls
Upvotes: 1
Reputation: 1817
Tunneling to HTTP or HTTPS only
By default, when ngrok runs an HTTP tunnel, it opens endpoints for both HTTP and HTTPS traffic. If you wish to only forward HTTP or HTTPS traffic, but not both, you can toggle this behavior with the --scheme flag.
Example: Only listen on an HTTP tunnel endpoint
ngrok http --scheme=http site.dev:80
Example: Only listen on an HTTPS tunnel endpoint
ngrok http --scheme=https site.dev:80
Upvotes: 6
Reputation: 554
Currently, to force the scheme (http instead of https) it is:
ngrok --scheme http http 8080
^ Binds to the 8080 port of the localhost
Upvotes: 12