ngrok creates a tunnel from the public internet to your local machine.
Sign up for an ngrok account https://dashboard.ngrok.com/
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken <YOUR_TOKEN>
ngrok http http://localhost:8080
ngrok http --host-header="local.site" http://local.site
ngrok http --host-header="local.site" https://local.site
Some applications get confused when they see a different host header than expected.
To resolve this, you can instruct ngrok to rewrite the Host header to “localhost” by using the --host-header
flag:
ngrok http [port] --host-header="localhost:[port]"