feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option - #15366
Conversation
|
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 What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
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 |
|
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. |
alan-agius4
left a comment
There was a problem hiding this comment.
This option also need to be added in the following schema
…wedHosts option Closes #13656
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.