compresssion doesn't work ,the vue.txt is 2m
c-y-q opened this issue · 2 comments
c-y-q commented
app.use(
compression({
level: 6,
filter: function(req, res) {
return true;
}
})
);
router.get("/", function(req, res, next) {
const fileData = fs.readFileSync("public/vue.txt").toString("base64");
// res.setHeader("Content-Encoding", "zip");//it doesn't work
res.json({
fileData
});
});
dougwilson commented
Just putting that into the example in the readme works fine with a 2mb file. There is a lot of missing information, though.
Can you follow up with:
- Version of node.js
- Version of this module and others used
- Steps to reproduce the issue
jonchurch commented
Closing as not reproducible