koajs / discussions

KoaJS Discussions
2 stars 2 forks source link

Using both koa-compress and koa-static , extremely slow when visit static files from 127.0.0.1 or localhost (from public address is fast), why? #45

Open doglex opened 4 years ago

doglex commented 4 years ago
"koa": "^2.12.0",
"koa-compress": "^4.0.1",
"koa-router": "^8.0.8",
"koa-static": "^5.0.0",
doglex commented 4 years ago

const ServeStatic = require('koa-static'); const Compress = require('koa-compress'); app.use(Compress( { threshold: 2048 })); app.use(router.routes()) app.use(ServeStatic(__dirname))

jonathanong commented 3 years ago

this could be from brotli - try disabling brotli or updating to the latest version of compress