-
-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ngrok): Adding ngrok feature #769
base: main
Are you sure you want to change the base?
feat(ngrok): Adding ngrok feature #769
Conversation
Great first pass! I'm working on some modifications in branch |
Great :) |
NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN} | ||
volumes: | ||
- ${WARDEN_ENV_PATH:-.}/.warden/ngrok.yml:/etc/ngrok.yml:ro,cached | ||
command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bruno-blackbird Reviewing the entrypoint script in the ngrok image, I think all you'd need to do here is just specify the NGROK_CONFIG
environment variable to be /etc/ngrok.yml
. The entrypoint script will start listening on all tunnels in the config file by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bap14 you mean instead of passing the command, yes, maybe it will be cleaner if I add it this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bruno-blackbird Yes, that's correct.
I tried to manually do this locally, and I'm wondering about the caddy config. It seems it's only adjusting "get" requests. What about POST? Will it work to add an item to the cart? Or log in? Or sign up? I'm not super familiar with Caddy and its syntax, so I'm just asking. |
@bap14 Yes it does replace only in @get, which is enough for me, I never get any need to replace urls in POST requests as adding item to the cart, log in and sign up are working fine. The only issue I get is with website with obfuscation on urls, as they are base 64 encoded, maybe I should add base_64 version of urls in caddy config too. |
Hello,
There is a working implementation of ngrok with caddy as a reverse proxy to automatically map urls from :
https://domain1.test to https://497b85f07962.ngrok.app
https://domain2.test to https://5fc752cab8e5.ngrok.app
It avoids having to change any url configuration in your local environement, the only limitation I found from now is that it does not work with obfuscated urls.
I also created a pull request on wardenenv/images and wardenenv/docs