Invalid Host header
See original GitHub issueIs this a bug report?
Yes
Environment
node -v
: v8.4.0npm -v
: 5.4.2npm ls react-scripts
(if you haven’t ejected): react-scripts@1.0.13
Then, specify:
- Operating system: Ubuntu 14.04 server
- Browser and version (if relevant): Chrome latest
Steps to Reproduce
(Write your steps here:)
- create-react-app client
- add “proxy”: “http://localhost:3001” to package.json
- npm start
- goto react url:port
- webpage reads “Invalid Host header”
Expected Behavior
React Test page loads
webpage does load with proxy setting removed.
Actual Behavior
webpage reads “Invalid Host header”
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
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 >Webpack Dev Server External Access - (Fix: Invalid Host ...
Webpack Dev Server External Access - (Fix: Invalid Host Header) ... No, making host: '0.0.0.0' won't work. No, disableHostCheck won't work.
Read more >What is this “Invalid Host Header” error? | by Avinash Thakur
In the course of testing an application hosted on your local machine, you may receive an “Invalid Host Header” error message when testing...
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 i added the domain name (from...
Read more >Fix Invalid host header localtunnel on React, Angular - YouTube
... #angular #fixOption 1If you do not need to use Authentication you can add configs to ngrok commandsngrok http 3000 -- host -...
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 Free
Top 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
PS: I found the issue. I had an entry
in my /etc/hosts (Ubuntu 16.04 standard installation). This resulted in HOST being looked up as 127.0.0.1 and bound accordingly.
For those finding this article, note that the documentation says that there’s no security by default, the more strict checks kick in only if you specify a proxy.
Sorry Joe, Thanks for the quick response!
That did not fix it, I got some error after I set the host about not finding a port for the proxy or something. I had to resort to disabling the check as I couldn’t get hung up on this at the moment. Close this and I’ll open an issue when I get back to it. Sorry,