I've installed localtunnel on my mac and received a URL after running lt --port 8081. I get the error: "Invalid Host Header". I didn't add a subdomain because I'm not sure where to write that command... is it a separate command or added to the end of lt --port 8081 --subdomain my-intinerary or do I write lt --port 8081/#/my-intinerary alltogether? I've googled for answers, but I'm not sure how to run the commands (_new to command line on Mac_). Thanks.
If you are using a webpack dev server either directly or through some other framework like angular/cli you need to tell webpack's dev server to disable host checks. For angular/cli you can disable this check when serving as follows: ng serve --disable-host-check
Hope that helps!
I can confirm that the solution proposed by @c0d3r1010 works.
this fixed it for me:
lt --port 3000 --subdomain my-app --local-host localhost
localtunnel's --local-host parameter rewrites the host header similar to ngrok's -host-header parameter:
ngrok http 3000 -host-header="localhost:3000"
A bit unrelated, but does anyone know how to get hot reload working with localtunnel? I specified host: '0.0.0.0' in dev server config, but it doesn't seem to work.
Most helpful comment
this fixed it for me:
lt --port 3000 --subdomain my-app --local-host localhostlocaltunnel's
--local-hostparameter rewrites the host header similar to ngrok's-host-headerparameter:ngrok http 3000 -host-header="localhost:3000"