mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
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:
@@ -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"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user