fix: Misformatted cache header

This commit is contained in:
Tom Moor committed 2021-11-17 18:04:56 -08:00
1 parent 2054087fb6
commit 508f06176a
1 file changed
+1 -3
+1 -3
View File
@@ -129,9 +129,7 @@ router.get("/locales/:lng.json", async (ctx) => {
await send(ctx, path.join(lng, "translation.json"), {
setHeaders: (res, path, stat) => {
if (process.env.NODE_ENV === "production") {
res.setHeader({
"Cache-Control": `max-age=${7 * 24 * 60 * 60}`,
});
res.setHeader("Cache-Control", `max-age=${7 * 24 * 60 * 60}`);
}
},
root: path.join(__dirname, "../../shared/i18n/locales"),