Skip to content

--disable-host-check doesn't work with new build system #28222

Closed as not planned

Description

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

v16.x.x

Description

The --disable-host-check flag is not available for the Angular application builder provided by the new build system introduced in v17 (@angular-devkit/build-angular:application). Even though it is a security risk, it was useful for testing the app on other devices connected to the same network.

Minimal Reproduction

ng new my-app
cd my-app
ng serve --disable-host-check

Exception or Error

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.
The "disableHostCheck" option will not be used because it is not supported by the "@angular-devkit/build-angular:application" builder.

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 18.1.4
Node: 20.16.0
Package Manager: bun 1.1.21
OS: linux x64

Angular: 18.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1801.4
@angular-devkit/build-angular   18.1.4
@angular-devkit/core            18.1.4
@angular-devkit/schematics      18.1.4
@schematics/angular             18.1.4
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Anything else relevant?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions