You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular 9 --disableHostCheck flag has no effect when --host is passed (or --configuration) #20951
Created a new project with Angular CLI 9.1.15 (but also tested with version 11.2.13, no difference at all):
$ npm run start -- --host 0.0.0.0
> angular-nine-template@0.0.0 start /home/rkrisztian/tmp/angular-nine-template
> ng serve "--host" "0.0.0.0"
WARNING: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.
Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.
(...)
$ npm run start -- --host 0.0.0.0 --disableHostCheck true
> angular-nine-template@0.0.0 start /home/rkrisztian/tmp/angular-nine-template
> ng serve "--host" "0.0.0.0" "--disableHostCheck" "true"
WARNING: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.
Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.
WARNING: Running a server with --disable-host-check is a security risk. See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a for more information.
(...)
Why does it still warn me?
I can't do anything about it, becuase if I move the host parameter to angular.json, and use --configuration to specify the configuration I want to use, the problem is still back, and --disableHostCheck cannot do anything about it!
Please help, this is really frustrating. Although right now we are on Angular version 9, we do plan to upgrade all the way up to 11 (maybe to 12 later), but it takes time...
Activity
alan-agius4 commentedon May 26, 2021
NB: this has no impact on the functionality of the dev-server. The warning is just being shown all the time.
fix(@angular-devkit/build-angular): show `--disable-host-check` warni…
fix(@angular-devkit/build-angular): show `--disable-host-check` warni…
angular-automatic-lock-bot commentedon Jun 26, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.