Set the first parameter of the setHeaders option to Koa Response
I think most people are used to using " Koa Response" in koa or not "Node Response". Just like use ctx.response.set('Cache-Control', 'max-age=0') or not ctx.res.setHeader(...). Because Koa officially states Bypassing Koa's response handling is not supported
This is also a problem for me;
if (!ctx.response.get('Cache-Control')) ctx.set('Cache-Control', 'max-age=' + (maxage / 1000 | 0));
I need to make sure there are no Cache-Control headers that will collide with Akamai but this currently can't be controlled with an options flag
staticServe(__dirname + "/public", { setHeadears: function (res, path, stats) { res.setHeader("Cache-Control", "max-age=60"); }, })
I want to ask why this is not effective?