mirror of
https://github.com/andrey271192/amnezia_web-PRO.git
synced 2026-09-20 14:42:00 +00:00
docs: add upgrade steps; no-store cache for admin static
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
11
server.js
11
server.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user