fix: language switch losing prefix + SSL redirect scheme
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 9s
Deploy Internet for Kids / Deploy (push) Successful in 6s
Deploy Internet for Kids / Health Check (push) Successful in 2s
Deploy Internet for Kids / Smoke Tests (push) Successful in 3s
Deploy Internet for Kids / Promote to Latest (push) Successful in 2s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 2s

Menu links used url= which doesn't prepend language prefix.
Changed to pageRef= which resolves per-language correctly.

Also fixed root redirect using http:// instead of https://
by reading X-Forwarded-Proto from gateway proxy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-03 11:08:36 +03:00
parent b6951ec29d
commit 2dfc9ed8bd
4 changed files with 18 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
map $http_x_forwarded_proto $real_scheme {
default $scheme;
https https;
}
server {
listen 80;
server_name _;
@@ -36,7 +41,7 @@ server {
# Redirect unprefixed paths to /en/
location ~ "^/(?!en/|de/|fr/|css/|js/|img/|favicon|android|apple|site|llms|health|robots|index\.xml|BingSiteAuth|[0-9a-f]{32}\.txt)" {
return 302 /en$request_uri;
return 302 $real_scheme://$host/en$request_uri;
}
# Clean URLs