Ngrok How can I forward to a specific URL?

Viewed 7727

I have a web app thats running on local. I try to use ngrok for webhooks but ngrok open the whole app to the world.(I dont want to use ngrok -auth because of some reasons.)

I want to ngrok forwards just for webhooks. For example:

Forwarding      http://xxxxx.ngrok.io -> localhost:80/webhook

Is that possible for ngrok?

Or Can I re-forward ngrok request in apache? I mean;

Ngrok forwards to localhost:80 and apache detect request coming from ngrok and re-forward to localhost:80/webhook.

2 Answers

You can use https://webhookrelay.com and specify the endpoint where you want your webhook to be delivered by appending to this URL:

relay forward --bucket my-app http://localhost:80/webhook

This way your app will not be exposed to the world. Webhook Relay has two modes:

  1. forward where it only opens one-way tunnel (nobody can get responses from your app so it's a safe way to deliver webhooks)
  2. connect where it creates a bidirectional tunnel which is very similar to what ngrok does. It does, however, add a bit more on top of it like let's encrypt certs, basic/token auth and on-the-fly content minification.
Related