René's URL Explorer Experiment


Title: fix(@angular/ssr): preserve query parameters on relative route redirects by bschaeublin · Pull Request #34299 · angular/angular-cli · GitHub

Open Graph Title: fix(@angular/ssr): preserve query parameters on relative route redirects by bschaeublin · Pull Request #34299 · angular/angular-cli

X Title: fix(@angular/ssr): preserve query parameters on relative route redirects by bschaeublin · Pull Request #34299 · angular/angular-cli

Description: Fixes #34298 PR Checklist Please check to confirm your PR fulfills the following requirements: 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 What kind of change does this PR introduce? Bugfix Feature Code style update (formatting, local variables) Refactoring (no functional changes, no api changes) Build related changes CI related changes Documentation content changes Other... Please describe: What is the current behavior? Issue Number: #34298 Route redirects with a string redirectTo are answered on the server from the extracted route tree, without running the router. For a relative redirectTo, the query string of the request is dropped (/search?q=x → Location: /search/results), while the router keeps it (/search/results?q=x). What is the new behavior? The server now matches the router for relative redirects: The query string of the request is kept (/search?q=x → /search/results?q=x), also with X-Forwarded-Prefix. A query or fragment written in a relative redirectTo is ignored, as the router ignores it. Absolute redirects are unchanged; the router does not keep the request query for them either. Whether redirectTo was relative is no longer known at request time, as it is resolved to an absolute path during route extraction. It is therefore recorded as an internal relativeRedirect flag on the route tree metadata, which is only set for relative redirects. Does this PR introduce a breaking change? Yes No Other information Tests: new cases in app_spec.ts (relative keeps the query, redirectTo query is ignored, absolute drops it, X-Forwarded-Prefix + query) and ng-routes_spec.ts (no flag on absolute redirects, query and fragment stripped for server and prerender routes). Verified locally with //packages/angular/ssr/test:test, the tests/build/server-rendering e2e tests (esbuild, Node 24) and ng-dev release build. Not covered by this change: With outputMode: 'static', prerendered redirect routes are static redirect pages with a fixed target, so the request query cannot be carried over there. :name query parameters copied by absolute redirects (redirectTo: '/search?q=:term') are still not emulated, as before. A separate issue and PR follow for relative redirects from multi-segment paths (old/page → /old/new/page). Both change the end of resolveRedirectTo, so whichever lands second needs a small rebase.

Open Graph Description: Fixes #34298 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...

X Description: Fixes #34298 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...

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

X: @github

direct link

Domain: github.com

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:dc4187a2-9fe0-1112-006b-831d0921c88d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE0E4:3511A9:134837:1B2E17:6AFDDE97
html-safe-nonce6d6f871969e11d5b1e5d9b4185dbc2c2be71e1b0f3f2250a7c4817abad79f21b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEU0OjM1MTFBOToxMzQ4Mzc6MUIyRTE3OjZBRkRERTk3IiwidmlzaXRvcl9pZCI6IjYyNzUwOTI2MjIwNDkxOTQ0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace586d59034ce20ce069a0089e3d1b5c98b9755ff1bdc09acab62dd7162acfa48
hovercard-subject-tagpull_request:4806040425
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/34299/files
twitter:imagehttps://avatars.githubusercontent.com/u/11610660?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/11610660?s=400&v=4
og:image:altFixes #34298 PR Checklist Please check to confirm your PR fulfills the following requirements: The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIB...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None90d7884679efe0f89b35e0eef84213a75179f38d11a62f2a0af551bbe5110799
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
release89e3d4b2f59ef440fc496c853aee1d9a06a137d6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular-cli/pull/34299/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fpull%2F34299%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%2F34299%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/34299/files
Reloadhttps://github.com/angular/angular-cli/pull/34299/files
Reloadhttps://github.com/angular/angular-cli/pull/34299/files
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues196 (196)https://github.com/angular/angular-cli/issues
Pull requests20 (20)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
bschaeublin:fix/ssr-redirect-preserve-queryhttps://github.com/bschaeublin/angular-cli/tree/fix/ssr-redirect-preserve-query
Conversation 7 https://github.com/angular/angular-cli/pull/34299
Commits 2 https://github.com/angular/angular-cli/pull/34299/commits
Checks 40 https://github.com/angular/angular-cli/pull/34299/checks
Files changed https://github.com/angular/angular-cli/pull/34299/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34299/files
fix(@angular/ssr): preserve query parameters on relative route redirects https://github.com/angular/angular-cli/pull/34299/files#top
Show all changes 2 commits https://github.com/angular/angular-cli/pull/34299/files
41d43e1 fix(@angular/ssr): preserve query parameters on relative route redirects bschaeublin Oct 9, 2026 https://github.com/angular/angular-cli/pull/34299/commits/41d43e1e04f5051139c07c360e0e8bbd458f71fd
77675db fixup! fix(@angular/ssr): preserve query parameters on relative route… bschaeublin Oct 9, 2026 https://github.com/angular/angular-cli/pull/34299/commits/77675db1d5ae3a62761cf95717997648571d70a2
Clear filters https://github.com/angular/angular-cli/pull/34299/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34299/files
Please reload this pagehttps://github.com/angular/angular-cli/pull/34299/files
app.ts https://github.com/angular/angular-cli/pull/34299/files#diff-8ef62cb23ebfc354d39a8ed845d9a724d734f935785b65179986e097f0a8248e
ng-routes.ts https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
route-tree.ts https://github.com/angular/angular-cli/pull/34299/files#diff-b4b0925a73ba21cdbb98f0484e05db8f74689e5915f3ff70b5c3cd0cb5e3caea
app_spec.ts https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
ng-routes_spec.ts https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
router_spec.ts https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
packages/angular/ssr/src/app.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-8ef62cb23ebfc354d39a8ed845d9a724d734f935785b65179986e097f0a8248e
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/packages/angular/ssr/src/app.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-8ef62cb23ebfc354d39a8ed845d9a724d734f935785b65179986e097f0a8248e
https://github.com/angular/angular-cli/pull/34299/files#diff-8ef62cb23ebfc354d39a8ed845d9a724d734f935785b65179986e097f0a8248e
packages/angular/ssr/src/routes/ng-routes.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/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/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
https://github.com/angular/angular-cli/pull/34299/files#diff-fc750eeef1ce9e348f16a8ca827e2031d90c9f8b1ac129adf353e2cd74447f1b
packages/angular/ssr/src/routes/route-tree.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-b4b0925a73ba21cdbb98f0484e05db8f74689e5915f3ff70b5c3cd0cb5e3caea
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/packages/angular/ssr/src/routes/route-tree.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-b4b0925a73ba21cdbb98f0484e05db8f74689e5915f3ff70b5c3cd0cb5e3caea
https://github.com/angular/angular-cli/pull/34299/files#diff-b4b0925a73ba21cdbb98f0484e05db8f74689e5915f3ff70b5c3cd0cb5e3caea
packages/angular/ssr/test/app_spec.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/packages/angular/ssr/test/app_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
https://github.com/angular/angular-cli/pull/34299/files#diff-fe02aa4a8c3c5a40e80d93a8b2d4a51bb2a6df36d3b1ee5533a6167e02e18ff5
packages/angular/ssr/test/routes/ng-routes_spec.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/packages/angular/ssr/test/routes/ng-routes_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
https://github.com/angular/angular-cli/pull/34299/files#diff-cb5be939ccf7ec9153bee6fdbe2965ebdcdf302ddc7c148b8f897f193714c345
packages/angular/ssr/test/routes/router_spec.tshttps://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
View file https://github.com/bschaeublin/angular-cli/blob/77675db1d5ae3a62761cf95717997648571d70a2/packages/angular/ssr/test/routes/router_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular-cli/pull/34299/{{ revealButtonHref }}
https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
https://github.com/angular/angular-cli/pull/34299/files#diff-f7bc9a661e4a6b2b3501864fc99943cc21b87a1c5c5a098a64a3b04213d29dfd
Please reload this pagehttps://github.com/angular/angular-cli/pull/34299/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

Viewport: width=device-width


URLs of crawlers that visited me.