-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Describe the bug
Node.js version: v22.11.0
OS version: MacOS 15.3.1
koa-compress version: 5.1.1
Description: Accept-Encoding: identity;q=1, *;q=0 not work
Actual behavior
response with Content-Encoding: gzip
Expected behavior
Content-Encoding: identity
Code to reproduce
const Koa = require('koa');
const compress = require('koa-compress');
const app = new Koa();
app.use(compress(
{
filter: (contentType) => {
return true;
},
threshold: 1,
br: false,
},
));
app.use(async (ctx) => {
ctx.body = 'This is a sample response that will be compressed if the client supports it.';
});
const port = 3000;
app.listen(port, () => {
console.log(`Server is running on port ${port}`);
});Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
