Enable CORS for woff2
This commit is contained in:
parent
a09d06e961
commit
a2f1f0fa88
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user