Angular AppEngine i18 redirect includes full domain #29514
Labels
area: @angular/ssr
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
build
Is this a regression?
The previous version in which this bug was not present was
No response
Description
While serving a i18n using AngularNodeAppEngine, the base path i18n redirect uses the full URL to do the 302 redirect to i18n subpaths.
https://github.com/angular/angular-cli/blob/main/packages/angular/ssr/src/app-engine.ts#L120
If the application is not served directly on the real domain (ex: using a cdn or cloud run), the redirect issued is redirecting to the bad domain.
Only redirecting to
/de/
path instead of full url should be enough.Minimal Reproduction
Create a ssr i18n app
Host it on google cloud run (url :
app.cloud.run.domain
)Point to it using any cdn/reverse proxy (url:
example.com
)Navigate to naked domain
example.com
Browser is redirected to
app.cloud.run.domain/de
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: