"Invalid Host header" when running Angular/cli development server c9.io

Olejs picture Olejs · Apr 28, 2017 · Viewed 84k times · Source

Current command: ng serve --host --public $IP:$PORT

Results on my website:

Invalid Host header

Answer

Rodolfo Díaz picture Rodolfo Díaz · Jul 28, 2017

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