From 3fe5f907db88d08fcdd7cbf437e8fe4fd87a9b9d Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 22 Feb 2026 15:30:17 -0500 Subject: [PATCH] fix: Add CORS header to locale file route Allow cross-origin requests for locale JSON files, consistent with other static asset routes. Needed when loading translations via CDN. Co-Authored-By: Claude Opus 4.6 --- server/routes/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/routes/index.ts b/server/routes/index.ts index 712f221dee..0e0c1950bc 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -105,6 +105,7 @@ router.get("/locales/:lng.json", async (ctx) => { "ETag", crypto.createHash("md5").update(stats.mtime.toISOString()).digest("hex") ); + res.setHeader("Access-Control-Allow-Origin", "*"); }, root: path.join(__dirname, "../../shared/i18n/locales"), });