Skip to content

feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option - #15366

Merged
kyliau merged 1 commit into
angular:masterfrom
mrxz:dev-server-allowed-hosts
Sep 9, 2019
Merged

feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option#15366
kyliau merged 1 commit into
angular:masterfrom
mrxz:dev-server-allowed-hosts

Conversation

@mrxz

@mrxz mrxz commented Aug 18, 2019

Copy link
Copy Markdown
Contributor

This PR adds allowedHosts as option and passes it along to the dev server. Issue #13656 describes a use-case for this. My use-case is slightly different, as I'm working on a multi-tenant application that derives the tenant from the host name. Having access to allowedHosts makes it possible to define multiple hosts pointing to 127.0.0.1 and using them to access the dev server (during development).

A test was added, but I'm not entirely happy with the end result. The beforeEach and afterEach are duplicate with public-host_spec_large.ts (although more spec files have the exact same code). It might also be better to combine it with the public-host spec file, as some test cases in there (no options specified, or with disableHostCheck) also apply to the allowedHosts option.

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@mrxz

mrxz commented Aug 18, 2019

Copy link
Copy Markdown
Contributor Author

@googlebot I signed it!

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@clydin clydin added the needs: discussion On the agenda for team meeting to determine next steps label Aug 19, 2019
@vikerman vikerman removed the needs: discussion On the agenda for team meeting to determine next steps label Aug 29, 2019
@clydin clydin added the target: major This PR is targeted for the next major release label Sep 5, 2019
@clydin

clydin commented Sep 5, 2019

Copy link
Copy Markdown
Member

Thank you for the contribution.

The test is fine for now. They could indeed use a refactor to combine similar items but that is outside the scope for this.

Can you rebase? Some changes to the CI checks were recently done.

Could you also add a Closes #13656 to the message?

@mrxz

mrxz commented Sep 5, 2019

Copy link
Copy Markdown
Contributor Author

I have rebased and amended the commit message. Several tests in test-large fail, but I get the exact same results when running the test-large set on master, so it seems unrelated to the change.

@clydin clydin removed their assignment Sep 5, 2019
@alan-agius4 alan-agius4 added PR state: blocked needs: discussion On the agenda for team meeting to determine next steps and removed PR state: blocked needs: discussion On the agenda for team meeting to determine next steps labels Sep 6, 2019

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option also need to be added in the following schema

@clydin
clydin requested a review from alan-agius4 September 9, 2019 18:03
@kyliau
kyliau merged commit 366e51b into angular:master Sep 9, 2019
@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Oct 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants