diff --git a/README.md b/README.md index 251e673..5047d95 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Additionally, you can specify one of several environment variable (via `-e`) to * `NGROK_PROTOCOL` - Can either be `HTTP` or `TCP`, and it defaults to `HTTP` if not specified. If set to `TCP`, Ngrok will allocate a port instead of a subdomain and proxy TCP requests directly to your application. * `NGROK_PORT` - Port to expose (defaults to `80` for `HTTP` protocol). * `NGROK_REGION` - Location of the ngrok tunnel server; can be `us` (United States, default), `eu` (Europe), `ap` (Asia/Pacific) or `au` (Australia) + * `NGROK_BINDTLS` - Toggle tunneling only HTTP or HTTPS traffic. When `true`, Ngrok only opens the HTTPS endpoint. When `false`, Ngrok only opens the HTTP endpoint #### Full example diff --git a/entrypoint.sh b/entrypoint.sh index 2ddf0d9..57f37ee 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,6 +26,11 @@ else NGROK_PORT="${NGROK_PORT:-80}" fi +# Set the TLS binding flag +if [ -n "$NGROK_BINDTLS" ]; then + ARGS="$ARGS -bind-tls=$NGROK_BINDTLS " +fi + # Set the authorization token. if [ -n "$NGROK_AUTH" ]; then ARGS="$ARGS -authtoken=$NGROK_AUTH "