-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 29, 2025
When redirecting to the preferred locale, the previous implementation used the full URL for the 302 redirect to i18n subpaths based on the user's preferred locale. This update ensures that the redirect now uses the locale-specific pathname instead of the full URL. Closes angular#29514
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Jan 29, 2025
When redirecting to the preferred locale, the previous implementation used the full URL for the 302 redirect to i18n subpaths based on the user's preferred locale. This update ensures that the redirect now uses the locale-specific pathname instead of the full URL. Closes angular#29514
alan-agius4
added a commit
that referenced
this issue
Jan 29, 2025
When redirecting to the preferred locale, the previous implementation used the full URL for the 302 redirect to i18n subpaths based on the user's preferred locale. This update ensures that the redirect now uses the locale-specific pathname instead of the full URL. Closes #29514
alan-agius4
added a commit
that referenced
this issue
Jan 29, 2025
When redirecting to the preferred locale, the previous implementation used the full URL for the 302 redirect to i18n subpaths based on the user's preferred locale. This update ensures that the redirect now uses the locale-specific pathname instead of the full URL. Closes #29514 (cherry picked from commit 46581db)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: