Skip to content

Commit

Permalink
Merge pull request #135 from ngrok/bob/verify-tls-tweaks
Browse files Browse the repository at this point in the history
add more to readme and examples for verify_upstream_tls
  • Loading branch information
bobzilladev authored Mar 19, 2024
2 parents 819d356 + a3831fb commit aadea81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ As of version `0.7.0` there is backend TLS connection support, validated by a fi
await ngrok.forward({ addr: "https://127.0.0.1:3000", authtoken_from_env: true });
```

If the service is using certs not trusted by the OS, such as self-signed certificates, add an environment variable like this before running: `SSL_CERT_FILE=/path/to/ca.crt`.
If the service is using certs not trusted by the OS, such as self-signed certificates, add an environment variable like this before running: `SSL_CERT_FILE=/path/to/ca.crt`. There is also a `verify_upstream_tls: false` option to disable certification verification.

### Async Programming

Expand Down Expand Up @@ -259,6 +259,7 @@ const listener = await ngrok.forward({
response_header_remove: ["X-Res-Nope"],
request_header_add: ["X-Req-Yup:true"],
response_header_add: ["X-Res-Yup:true"],
verify_upstream_tls: false,
verify_webhook_provider: "twilio",
verify_webhook_secret: "asdf",
websocket_tcp_converter: true,
Expand Down
1 change: 1 addition & 0 deletions examples/ngrok-forward-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ngrok.consoleLog("INFO"); // turn on info logging
request_header_add: ["X-Req-Yup:true"],
response_header_add: ["X-Res-Yup:true"],
schemes: ["HTTPS"],
// verify_upstream_tls: false,
// verify_webhook_provider: "twilio",
// verify_webhook_secret: "asdf",
// websocket_tcp_converter: true,
Expand Down
1 change: 1 addition & 0 deletions examples/ngrok-http-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ builder.connect().then((session) => {
// .requestHeader("X-Req-Yup", "true")
// .responseHeader("X-Res-Yup", "true")
// .scheme("HTTPS")
// .verifyUpstreamTls(false)
// .websocketTcpConversion()
// .webhookVerification("twilio", "asdf")
.metadata("example listener metadata from nodejs")
Expand Down

0 comments on commit aadea81

Please sign in to comment.