fix: 静态资源禁用缓存,避免改完看不到
This commit is contained in:
1 parent
6c147274cd
commit
f2c1a52a2e
2 files changed
+10
-1
No files matched your search
+5
-1
@@ -22,7 +22,11 @@ const SETTINGS_PATH = process.env.SETTINGS_PATH || '/data/settings.json';
|
||||
const COMPOSE_ROOT = process.env.COMPOSE_ROOT || '/host/vol1/1000/HD1/docker';
|
||||
|
||||
app.use(express.json({ limit: '1mb' }));
|
||||
app.use(express.static(path.join(__dirname, '..', 'public')));
|
||||
app.use(express.static(path.join(__dirname, '..', 'public'), {
|
||||
etag: false,
|
||||
lastModified: false,
|
||||
setHeaders: (res) => res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate'),
|
||||
}));
|
||||
|
||||
/* ---------------- 设置 ---------------- */
|
||||
const DEFAULT_SETTINGS = {
|
||||
|
||||
Reference in new issue
Block a user