Enable CORS for woff2

This commit is contained in:
benweet 2018-04-05 23:55:51 +01:00
parent a09d06e961
commit a2f1f0fa88

View File

@ -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();