Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Add fonts and svgs to gzip compression pattern
Browse files Browse the repository at this point in the history
I think it's good to have these here "just in case", even the seed project wouldn't have any fonts/svgs. These are just so common filetypes at any project.

Thoughts?
  • Loading branch information
simison committed May 16, 2015
1 parent 426ce9e commit fea436f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports.initMiddleware = function (app) {
// Should be placed before express.static
app.use(compress({
filter: function (req, res) {
return (/json|text|javascript|css/).test(res.getHeader('Content-Type'));
return (/json|text|javascript|css|font|svg/).test(res.getHeader('Content-Type'));
},
level: 9
}));
Expand Down

0 comments on commit fea436f

Please sign in to comment.