diff --git a/server.js b/server.js index 3a3783c..c51c097 100644 --- a/server.js +++ b/server.js @@ -34,7 +34,13 @@ const PIPER_OK = existsSync(PIPER_MODEL); const app = express(); app.use(express.json({ limit: '15mb' })); // photos for page-scanning are base64 in the JSON body -app.use(express.static(join(ROOT, 'public'))); +app.use(express.static(join(ROOT, 'public'), { + setHeaders(res, filePath) { + if (filePath.endsWith('.css') || filePath.endsWith('.js')) { + res.setHeader('Cache-Control', 'no-cache'); + } + }, +})); const docxUpload = multer({ storage: multer.memoryStorage(), limits: { fileSize: 20 * 1024 * 1024 } });