docs: add upgrade steps; no-store cache for admin static

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-14 15:56:57 +03:00
parent 7b291ff1d5
commit e93a7e9f60
2 changed files with 30 additions and 1 deletions

View File

@@ -592,7 +592,16 @@ app.post("/api/clients/delete", requireAuth, async (req, res) => {
const pub = path.join(__dirname, "public");
if (fs.existsSync(pub)) {
app.use(express.static(pub));
app.use(
express.static(pub, {
setHeaders(res, filePath) {
const lower = filePath.toLowerCase();
if (lower.endsWith(".html") || lower.endsWith(".js") || lower.endsWith(".css")) {
res.setHeader("Cache-Control", "no-store");
}
},
}),
);
}
app.use((_req, res) => {