Reputation: 643
I am getting Invalid Host header
after installing the node_modules in my project. Then I googled it and found this. But don't where I need to add this line in webpack.config.js
.
devServer: {
compress: true,
public: 'store-client-nestroia1.c9users.io' // That solved it
}
Can some one please help me to do the same.
Edit 1: I have added it in webpack.config.dev.js
but still no luck
Thank you!!!
Upvotes: 0
Views: 1424
Reputation: 2932
Invalid Host header come becuse of a configuration error in webpack configuration.
So just use react-scripts to run project and undo your webpack configuration.
If you did your webpack configuration setup using
$ npm run eject / yarn run eject
just undo 'npm run eject / yarn run eject' from react project.
It worked for Me. May be helpful for you.
Upvotes: 1