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 <noreply@anthropic.com>
This commit is contained in:
Tom Moor
2026-02-22 15:30:17 -05:00
parent 496b89c7f8
commit 3fe5f907db
+1
View File
@@ -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"),
});