“Invalid Host header” when running Angular/cli development server c9.io
问题 Current command: ng serve --host --public $IP:$PORT Results on my website: Invalid Host header 回答1: The --disable-host-check flag works fine if you need to run from Cloud9. I use the following command: ng serve --open --host $IP --port $PORT --disable-host-check 回答2: You need to specify the host ng serve --port 8080 --host 123.34.56.78 回答3: See this issue Edit the following line in node_modules/webpack-dev-server/lib/Server.js (line 425), change to: return true; I am using cloud9 IDE then run