fix: exclude /data/ and /fonts/ from language redirect in nginx
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 1s
Deploy Internet for Kids / Smoke Tests (push) Successful in 2s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 6s
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 1s

/data/countries-110m.json was being 302'd to /en/data/ which 404'd.
Also exclude /fonts/ for self-hosted Newsreader woff2 files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-03 15:49:27 +03:00
parent cc5568f0a9
commit c287b3cf02

View File

@@ -40,7 +40,7 @@ server {
} }
# Redirect unprefixed paths to /en/ # 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)" { location ~ "^/(?!en/|de/|fr/|css/|js/|data/|fonts/|img/|favicon|android|apple|site|llms|health|robots|index\.xml|BingSiteAuth|[0-9a-f]{32}\.txt)" {
return 302 $real_scheme://$host/en$request_uri; return 302 $real_scheme://$host/en$request_uri;
} }