Created by Urban Ishimwe
Route ngrok URL to static URL
"I am overwhelmed by configuring URL on API service like Slack everytime I start my Ngrok server". Then, this might be the solution.
- Fork this repository
- create an account on Heroku
- deploy the forked version on your Heroku
- Config your URL by setting an heroku environment:
URL
=secure-ngrok-url
- Config your SECRET by setting an heroku environment variable: e.g
SECRET
=IFFEnGFS4H
you might need to restart your app everytime you change this environments
Now, you can just use your Heroku link that will forward to your ngrok dynamic address.
If you want to change your url without changing the URL env variable and restarting your app. You can use the route:
https://HEROKU_URL/update_ngrok&secret=SECRET&url=NGROK_URL
You can, for example, open with your browser: https://myheroku/update_ngrok&secret=IFFEnGFS4H&url=https://b1dd4477.ngrok.io/
or From your terminal
curl "your_heroku/update_ngrok?secret=IFFEnGFS4H&url=https://b1dd4477.ngrok.io"
Feel free to contribute, PR and issues are very welcome 🙏🙏🙏🙏