Skip to content

Commit

Permalink
Enable CORS for woff2
Browse files Browse the repository at this point in the history
  • Loading branch information
benweet committed Apr 5, 2018
1 parent a09d06e commit a2f1f0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a2f1f0f

Please sign in to comment.