René's URL Explorer Experiment


Title: fix(@angular/ssr): harden platform destruction and abort/response cleanup guards by alan-agius4 · Pull Request #34781 · angular/angular-cli · GitHub

Open Graph Title: fix(@angular/ssr): harden platform destruction and abort/response cleanup guards by alan-agius4 · Pull Request #34781 · angular/angular-cli

X Title: fix(@angular/ssr): harden platform destruction and abort/response cleanup guards by alan-agius4 · Pull Request #34781 · angular/angular-cli

Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines Tests for the changes have been added (for bug fixes / features) Docs have been added / updated (for bug fixes / features) PR Type Bugfix What is the current behavior? Follow-up hardening after #34768 (related to #34754 / #34777): getRoutesFromAngularRouterConfig() calls platformRef.destroy() directly in finally without checking !platformRef.destroyed or catching destroy-hook errors, which can throw NG0404, fail route extraction, or mask errors thrown inside try. renderAngular() checks platformRef.destroyed and applicationRef.destroyed, but does not check applicationRef.injector.destroyed (or destroyPromise before content()), which can still throw NG0205 if the environment injector is marked destroyed before ApplicationRef.ngOnDestroy() completes. writeResponseToNodeResponse() returns early when the Node destination is already closed/destroyed without cancelling source.body. createAngularSsrInternalMiddleware() wraps createWebRequestFromNodeRequest(req) with { signal: AbortSignal.timeout(30_000) }, replacing the client-disconnect AbortSignal instead of combining both signals. What is the new behavior? Guard platformRef.destroy() in getRoutesFromAngularRouterConfig() with if (!platformRef.destroyed) and catch/log destroy-hook errors via console.error. Check destroyPromise, platformRef.destroyed, applicationRef.destroyed, applicationRef.injector.destroyed, and signal?.aborted consistently across renderAngular() and content() (and replace silent early-return guards in ng_spec.ts with node:assert). Cancel unlocked source.body streams (with error logging) when writeResponseToNodeResponse() returns early on an already-closed Node response. Combine nodeWebReq.signal and AbortSignal.timeout(30_000) using AbortSignal.any() in createAngularSsrInternalMiddleware(). Does this PR introduce a breaking change? No

Open Graph Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines Tests for the changes have been added (for bug...

X Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines Tests for the changes have been added (for bug...

Opengraph URL: https://github.com/angular/angular-cli/pull/34781

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:362dbae9-5562-4607-3e1a-782457459893
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC8A:1B5128:351D5C:47E4D9:6B061C01
html-safe-nonce82acca985f457a0564efc464ca0d798c7ad0e83c270d31172d0482cc20ce6b8f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzhBOjFCNTEyODozNTFENUM6NDdFNEQ5OjZCMDYxQzAxIiwidmlzaXRvcl9pZCI6Ijg2OTUwNDAwODg1NzA0NjkzNzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca2abf28c18176a21516ab38591bfbceb1d6fa9a15c47c8e0a98a9adefdd9d8d9
hovercard-subject-tagpull_request:5468547158
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular-cli/pull/34781/files
twitter:imagehttps://avatars.githubusercontent.com/u/17563226?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17563226?s=400&v=4
og:image:altPR Checklist The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines Tests for the changes have been added (for bug...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb25c3080e84402f75431d8dc7a96b2635219cec7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular-cli/pull/34781/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fpull%2F34781%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fpull%2F34781%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/pull/34781/files
Reloadhttps://github.com/angular/angular-cli/pull/34781/files
Reloadhttps://github.com/angular/angular-cli/pull/34781/files
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular-cli%2Fissues%2Fnew%2Fchoose
alan-agius4https://github.com/alan-agius4
angular:mainhttps://github.com/angular/angular-cli/tree/main
alan-agius4:fix/ssr-abort-destroy-followupshttps://github.com/alan-agius4/angular-cli/tree/fix/ssr-abort-destroy-followups
Conversation 3 https://github.com/angular/angular-cli/pull/34781
Commits 3 https://github.com/angular/angular-cli/pull/34781/commits
Checks 38 https://github.com/angular/angular-cli/pull/34781/checks
Files changed 9 https://github.com/angular/angular-cli/pull/34781/files
fix(@angular/ssr): harden platform destruction and abort/response cleanup guards https://github.com/angular/angular-cli/pull/34781/files#top
Show all changes 3 commits https://github.com/angular/angular-cli/pull/34781/files
5c0fb2b fix(@angular/ssr): harden platform destruction and response cleanup g… alan-agius4 Nov 24, 2026 https://github.com/angular/angular-cli/pull/34781/commits/5c0fb2bd302ac5594321a5689fc9deba60ce1751
930d82e fix(@angular/build): preserve client abort signal in Vite SSR middleware alan-agius4 Nov 24, 2026 https://github.com/angular/angular-cli/pull/34781/commits/930d82e3e3f566a4a6f11e599eed0be28ff05715
bb37c4e fixup! fix(@angular/ssr): harden platform destruction and response cl… alan-agius4 Nov 24, 2026 https://github.com/angular/angular-cli/pull/34781/commits/bb37c4ef98e8e6787c37029adf444d55bc336a93
Clear filters https://github.com/angular/angular-cli/pull/34781/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34781/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34781/files
ssr-middleware.ts https://github.com/angular/angular-cli/pull/34781/files#diff-956256820cc7ab514d9fb7ea9456a172334462662635f29a5a8b56e2d67630a9
ssr-middleware_spec.ts https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
response.ts https://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
response_http1_spec.ts https://github.com/angular/angular-cli/pull/34781/files#diff-a3a07d1e10678aee3ca3c90b61bddc38b8f0328fc541f7992a4cc396ff5eb6a7
response_http2_spec.ts https://github.com/angular/angular-cli/pull/34781/files#diff-0aa210e88a33b8595b5cf171f1922308004e81ed1d3751fbfa2bdca3339d9142
ng-routes.ts https://github.com/angular/angular-cli/pull/34781/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
ng.ts https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
ng-routes_spec.ts https://github.com/angular/angular-cli/pull/34781/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
ng_spec.ts https://github.com/angular/angular-cli/pull/34781/files#diff-3c7a491b51741ebfa9211cba5e96dcd167e559972f7e1f05ec90111d640949dd
packages/angular/build/src/tools/vite/middlewares/ssr-middleware.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-956256820cc7ab514d9fb7ea9456a172334462662635f29a5a8b56e2d67630a9
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/build/src/tools/vite/middlewares/ssr-middleware.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-956256820cc7ab514d9fb7ea9456a172334462662635f29a5a8b56e2d67630a9
Please reload this pagehttps://github.com/angular/angular-cli/pull/34781/files
https://github.com/angular/angular-cli/pull/34781/files#diff-956256820cc7ab514d9fb7ea9456a172334462662635f29a5a8b56e2d67630a9
packages/angular/build/src/tools/vite/middlewares/ssr-middleware_spec.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/build/src/tools/vite/middlewares/ssr-middleware_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
https://github.com/angular/angular-cli/pull/34781/files#diff-22e802ebe141edfe1573103f3de743bff3c6bf0630c9995d00146d09f90006d9
packages/angular/ssr/node/src/response.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/ssr/node/src/response.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
Please reload this pagehttps://github.com/angular/angular-cli/pull/34781/files
https://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
https://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
https://github.com/angular/angular-cli/pull/34781/files#diff-e9a8e11f8ba8e6179d9d2746330ebdb2900cba68f0be8e9d0f34ad952cb90e43
packages/angular/ssr/node/test/response_http1_spec.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-a3a07d1e10678aee3ca3c90b61bddc38b8f0328fc541f7992a4cc396ff5eb6a7
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/ssr/node/test/response_http1_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-a3a07d1e10678aee3ca3c90b61bddc38b8f0328fc541f7992a4cc396ff5eb6a7
packages/angular/ssr/node/test/response_http2_spec.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-0aa210e88a33b8595b5cf171f1922308004e81ed1d3751fbfa2bdca3339d9142
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/ssr/node/test/response_http2_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-0aa210e88a33b8595b5cf171f1922308004e81ed1d3751fbfa2bdca3339d9142
packages/angular/ssr/src/routes/ng-routes.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/ssr/src/routes/ng-routes.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34781/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
packages/angular/ssr/src/utils/ng.tshttps://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
View file https://github.com/angular/angular-cli/blob/bb37c4ef98e8e6787c37029adf444d55bc336a93/packages/angular/ssr/src/utils/ng.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34781/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
https://github.com/angular/angular-cli/pull/34781/files#diff-ff9bebde3248fcdf148a338cf97ed47dcc15d684c2af9c62d20dd619eb6c1f53
Please reload this pagehttps://github.com/angular/angular-cli/pull/34781/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.