Error "Invalid Host Header"
See original GitHub issueI’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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
I am getting an "Invalid Host header" message when ...
Most commonly this "Invalid Host header" issue comes up when trying to server to other clients on the network. After adding host: '0.0.0.0'...
Read more >What is this “Invalid Host Header” error? | by Avinash Thakur
This error is most commonly caused by a misconfiguration of the application server that causes it to reject non-local connections.
Read more >How to fix "Invalid Host Header" - RedwoodJS Community
When you run Redwood in dev mode, and would like to test the application as it is rendered from an external source (outside...
Read more >Webpack Dev Server External Access - (Fix: Invalid Host ...
I faced this issue recently and, while I implemented the solution by reading the docs, I found that majority of the solutions in...
Read more >"Invalid Host header" Error - DigitalOcean
I have deployed my server on ubunto-20x, tested it with IP address and was working fine. Then setup-ed SSL certificate using Let's Encrypt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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"
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!