[Bug] "Invalid Host Header" using ng serve --host 0.0.0.0
See original GitHub issueDo you want to request a feature or report a bug?
Bug (cascaded from angular-cli 1.0.1 [webpack-dev-server])
Bug Report
See here: https://github.com/webpack/webpack-dev-server/issues/882
Due to a security fix in webpack, running Covalent source app via proxy results in “Invalid Host Header” printed in the browser. This affects angular-cli 1.0.1
What is the expected behavior?
Covalent source app runs normally.
What is the motivation / use case for changing the behavior?
Working on the Covalent source app for IE11 support using a windows VM for IE11/Edge. I deploy the app on my Mac using ng serve --host 0.0.0.0
to expose it the VM.
Which version of Angular and Material, and which browser and OS does this issue affect?
Affects angular-cli 1.0.1 (See here: https://github.com/angular/angular-cli/issues/6070)
Did this work in previous versions of Angular / Material?
Works in angular-cli 1.0.0
Other information
Rolling back the angular-cli version to previous version restores functionality
ng serve --host 0.0.0.0
I can put in a PR for this breaking dependency.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:9 (7 by maintainers)
Top Results From Across the Web
"Invalid Host header" when running Angular/cli development ...
This is a major security issue: some malicious code can request your development server on your behalf and get the response. The problem...
Read more >What is this “Invalid Host Header” error? | by Avinash Thakur
This error is most commonly caused by a misconfiguration of the application server that causes it to reject non-local connections.
Read more >[Solved]-Fix "invalid host header" in Angular-angular.js
ng (Angular) => Kill the server and restart it, adding --host 0.0.0.0 --disableHostCheck true. to the command. ; Angular2 => Same as above,...
Read more >ng serve --public-host
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 >docksal/community-support - Gitter
Hmmm. It compiles now but gets Invalid Host header in the browser. ... I would search more for ng serve and Angular app...
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
btw workaround for this is running:
Yeah, the latest
1.1.0-beta.1
has that flag. Supposed to be for that specific case.