{{ message }}
feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option - #15366
Merged
Conversation
Contributor
Author
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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 |
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
approved these changes
Sep 5, 2019
alan-agius4
requested changes
Sep 6, 2019
alan-agius4
left a comment
Collaborator
There was a problem hiding this comment.
This option also need to be added in the following schema
…wedHosts option Closes #13656
alan-agius4
approved these changes
Sep 9, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds
allowedHostsas 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 toallowedHostsmakes 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
beforeEachandafterEachare duplicate withpublic-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 withdisableHostCheck) also apply to theallowedHostsoption.