Can't remote develop create-react-app due to "Invalid Host Header"
See original GitHub issueAt work I do all my development shelled into an AWS instance. This means my code and dev server are both remote, but my browser is local. When I try to access my react app, I get “Invalid Host Header”. I think this is due to the fix for webpack/webpack-dev-server#887. From googling around, it looks like I can fix this by ejecting, but that’s supposed to be for power users and the reason I’m trying create-react-app
in the first place is I don’t understand anything about the ecoystem yet.
Is there anything I can do about this aside from ejecting? Is this worth fixing somehow?
Someone asked a question about this on Stack Overflow but didn’t get a response.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:30 (9 by maintainers)
Top Results From Across the Web
Invalid Host header when running Create React App on ...
An easy solution for development environment would be to set the following environment variable: DANGEROUSLY_DISABLE_HOST_CHECK=true.
Read more >Webpack Dev Server External Access - (Fix: Invalid Host ...
While developing a React web app in local development mode, you may want to run the dev mode on mobile or quickly share...
Read more >“Invalid Host Header” Errors when running your React project ...
So your react app is hosted on localhost:3000 and your node backend is on localhost:3001. This isn't a problem if you a developing...
Read more >DilwoarH/G-Cloud-Chat-Bot - Buttons - Heroku Elements
Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best...
Read more >webpack Invalid Host header when accessing from domain ...
If you are trying to recreate what create-react-app is doing on your own, following the HOST header in their open source code, you...
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
Can you put your HOST into
.env
file?Then restart the development server.
Please update to
react-scripts@1.0.2
.It fixes this issue for users who don’t use the
proxy
feature.If you do use the
proxy
feature, please follow these instructions.