Title: ng serve --allowed-hosts results in ERR_CONNECTION_REFUSED · Issue #25194 · angular/angular-cli · GitHub
Open Graph Title: ng serve --allowed-hosts results in ERR_CONNECTION_REFUSED · Issue #25194 · angular/angular-cli
X Title: ng serve --allowed-hosts results in ERR_CONNECTION_REFUSED · Issue #25194 · angular/angular-cli
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 Node v16 Description Running ng serve with an allowed-hosts setting will not connect w...
Open Graph 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 Node v16 Description Running ng serve with an ...
X 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 Node v16 Description Running ng serve with an ...
Opengraph URL: https://github.com/angular/angular-cli/issues/25194
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng serve --allowed-hosts results in ERR_CONNECTION_REFUSED","articleBody":"### Command\r\n\r\nserve\r\n\r\n### Is this a regression?\r\n\r\n- [X] Yes, this behavior used to work in the previous version\r\n\r\n### The previous version in which this bug was not present was\r\n\r\nNode v16\r\n\r\n### Description\r\n\r\nRunning ng serve with an `allowed-hosts` setting will not connect with Node v18 on Windows.\r\n\r\n### Minimal Reproduction\r\n\r\nAngular setup:\r\n\r\n```\r\nng new testapp\r\ncd testapp\r\nng serve --port 80 --allowed-hosts testing.local.dev.com\r\n```\r\n\r\nWindows HOSTS:\r\n```\r\n# Windows/system32/drivers/etc/HOSTS\r\n\r\n\r\n127.0.0.1 testing.local.dev.com\r\n```\r\n\r\n\r\n### Exception or Error\r\n\r\n```text\r\nWith Node v16.20.0 the example serves normally in a browser @ `testing.local.dev.com`\r\n\r\nWith Node v18.16.0 the example errors in a browser with `ERR_CONNECTION_REFUSED`\r\n\r\nThese are both using NG 16.0.1\r\n```\r\n\r\n\r\n### Your Environment\r\n\r\n```text\r\n\u003e testapp@0.0.0 ng\r\n\u003e ng version\r\n\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n\r\n\r\nAngular CLI: 16.0.1\r\nNode: 18.16.0\r\nPackage Manager: npm 9.5.1\r\nOS: win32 x64\r\n\r\nAngular: 16.0.1\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1600.1\r\n@angular-devkit/build-angular 16.0.1\r\n@angular-devkit/core 16.0.1\r\n@angular-devkit/schematics 16.0.1\r\n@schematics/angular 16.0.1\r\nrxjs 7.8.1\r\ntypescript 5.0.4\r\n```\r\n\r\n\r\n### Anything else relevant?\r\n\r\nNot sure if this issue is node, webpack, or angular related, so if it belongs somewhere more appropriate, any help getting it there would be appreciated.","author":{"url":"https://github.com/MrAlexBailey","@type":"Person","name":"MrAlexBailey"},"datePublished":"2023-05-12T00:56:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/25194/angular-cli/issues/25194"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c5fe9ff3-8f14-eb23-fa31-6c82e7b3a8b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A498:2AEA36:19DF970:2250199:696AF073 |
| html-safe-nonce | 06cd169d86c5ed68f37394ab6e184f8c5a3f2bb74b7c031f054699ca138321b7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDk4OjJBRUEzNjoxOURGOTcwOjIyNTAxOTk6Njk2QUYwNzMiLCJ2aXNpdG9yX2lkIjoiNzQ2NDM3ODM2MTYxOTA4MzM3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a02b366d501dbca3e744a94d03cb1c0a90a9cf1cee52ab8da4d2796012b93f95 |
| hovercard-subject-tag | issue:1706763115 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/25194/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7ad6da6ee19b647da54745c410c65757ea821edea2638936b5fa26fa1827ecc6/angular/angular-cli/issues/25194 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7ad6da6ee19b647da54745c410c65757ea821edea2638936b5fa26fa1827ecc6/angular/angular-cli/issues/25194 |
| og:image:alt | 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 Node v16 Description Running ng serve with an ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MrAlexBailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width