diff --git a/loled.js b/loled.js index 76d6c4a..9a938f8 100755 --- a/loled.js +++ b/loled.js @@ -82,12 +82,20 @@ app.use((ctx, next) => { ctx.response.headers.append("Access-Control-Allow-Headers", "*") if(ctx.request.method == "OPTION"){ - ctx.response.status = 200 + ctx.response.status = 204 } else { return next() } }) +app.use((ctx, next) => { + if(ctx.request.url.pathname.startsWith("/_loled")){ + ctx.response.headers.append("Cache-Control", "no-store") + } + + return next() +}) + // Static app.use(async (ctx, next) => { if(ctx.request.url.pathname.startsWith("/_loled"))