Skip to content

SSR url normalization causes 302 redirects #31881

@MarcoGlauser

Description

@MarcoGlauser

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

No response

Description

With the introduction of #31497, we noticed higher CPU usage and looked at the logs. We noticed a lot of 302 redirects happening now that will cause 2 requests to be served instead of one.
Angular SSR is already slow, taking more than a second to answer requests. With the introduction of the redirects, the ssr server now has to compute two requests and end user latency doubles.

It looks like the internal url normalization of angular will issue redirects, where they're not necessary.

Minimal Reproduction

This url /?email=xyz%40xyz.com Will redirect to /?email=xyz@xyz 

Exception or Error

 

Your Environment

Angular CLI: 20.3.10 Node: 24.11.0 Package Manager: npm 11.6.1 OS: linux x64 Angular: 20.3.12 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... platform-server, router Package Version ----------------------------------------- @angular-devkit/architect 0.2003.10 @angular-devkit/core 20.3.10 @angular-devkit/schematics 20.3.10 @angular/build 20.3.10 @angular/cdk 20.2.13 @angular/cli 20.3.10 @angular/material 20.2.13 @angular/material-luxon-adapter 20.2.13 @angular/ssr 20.3.10 @angular/youtube-player 20.2.13 @schematics/angular 20.3.10 typescript 5.9.3 zone.js 0.15.1 

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions