static-cache
static-cache copied to clipboard
[MAINTAINERS WANTED] Static cache for koa
## Describe the bug **Node.js version:** v16.20.1 **OS version:** macOS 13.5.1 **Description:** the app crashes when attempting to read a file larger than 2GB.. setting config.buffer false. ## Actual behavior...
## Describe the feature can you provide a callback function setHeader which can custom defined https response header, I need to define some header to avoid security problem
 期望在图片位置加上静态.gz文件的调用
使用 static-cache 作为静态文件托管,使用过程中,概率出现以下报错 ```js 2021-12-30 10:14:09,663 ERROR 247 [-/-/172.16.224.25/64407ebb16408304496621596d00f7/2ms GET /public/common/bi.jpeg] ### onerror handle { TypeError: Cannot read property 'getTime' of undefined at /xxxxl/node_modules/[email protected]@koa-static-cache/index.js:86:48 status: 500 } 2021-12-30 10:15:17,903 ERROR...
set stream to paused, avoid missing data. it will auto flow after pipe. #97
If I modified the file after loaded, chrome will throw ERR_CONTENT_LENGTH_MISMATCH error ======================= 翻译:static-cache 加载完成文件后,如果我更新了文件,static-cache没有重新loadFile,就会出现文件信息和缓存不一致的情况,比如长度不一致,浏览器就会报 ERR_CONTENT_LENGTH_MISMATCH 错误
use buffer means never have the new file ?
Would be nice to see an option for pre-compressed brotli files.
This pull requests adds the support for Brotli, both of dynamic compression and precompiled `.br` files. Brotli support is a missing piece that `koa-static` does have. I've also updated `supertest`...
```js { gzip: true, maxAge: 365 * 24 * 60 * 60, usePrecompiledGzip: true }, { '/index.html': { maxAge: 0 } } ``` I set `maxAge = 0` for `index.html`,...