Skip to content

Expose webpack-dev-server allowedHosts option #13656

Description

@diminutivesloop

🚀 Feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

Due to constraints of our development environment my team usually accesses their local instance of our Angular application via their Windows machine name rather than an ip address or localhost. Since machine names are unique we can't set the host option in angular.json and as a result individual developers have to pass their machine name on the command line when running ng serve.

Describe the solution you'd like

Since our machine names have a common parent domain it would simplify our development setup if the allowedHosts option of webpack-dev-server was exposed as an option for ng serve. This would enable us to configure a host wildcard that includes all of our machine names without additional user-local configuration.

Describe alternatives you've considered

One alternative solution would be to enable the disableHostCheck option but this leaves our machines vulnerable to a dns rebinding attack.

Activity

  1. changed the title [-]Expose webpack dev server allowedHosts option[/-] [+]Expose webpack-dev-server allowedHosts option[/+] on Feb 12, 2019
  2. added this to the needsTriage milestone on Feb 12, 2019
  3. added
    featureLabel used to distinguish feature request from other issues
    on Feb 12, 2019
  4. modified the milestones: needsTriage, Backlog on Feb 12, 2019
  5. angular-automatic-lock-bot commented on Oct 10, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Oct 10, 2019
  7. added a commit that references this issue on May 29, 2026
    6bd17e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions