From a2f1f0fa88aef2974a36d39ef8ffdc6eacfc4a5d Mon Sep 17 00:00:00 2001 From: benweet Date: Thu, 5 Apr 2018 23:55:51 +0100 Subject: [PATCH] Enable CORS for woff2 --- server/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 55889047..289d8519 100644 --- a/server/index.js +++ b/server/index.js @@ -13,7 +13,7 @@ module.exports = (app, serveV4) => { if (process.env.NODE_ENV === 'production') { // Enable CORS for fonts app.all('*', (req, res, next) => { - if (/\.(eot|ttf|woff|svg)$/.test(req.url)) { + if (/\.(eot|ttf|woff2?|svg)$/.test(req.url)) { res.header('Access-Control-Allow-Origin', '*'); } next();