fix: Serve CORS header for fonts
This commit is contained in:
@@ -32,6 +32,9 @@ router.use(["/images/*", "/email/*", "/fonts/*"], async (ctx, next) => {
|
||||
root: path.resolve(__dirname, "../../../public"),
|
||||
// 7 day expiry, these assets are mostly static but do not contain a hash
|
||||
maxAge: 7 * 24 * 60 * 60 * 1000,
|
||||
setHeaders: (res) => {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
},
|
||||
});
|
||||
} catch (err) {
|
||||
if (err.status !== 404) {
|
||||
|
||||
Reference in New Issue
Block a user