feat(server): add cache control headers for API responses to prevent browser caching
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m24s

This commit is contained in:
2026-01-20 16:09:53 +07:00
parent c6599efb21
commit 4b8fcef17a
+6
View File
@@ -87,6 +87,12 @@ app.set('etag', false);
app.use((req, res, next) => {
res.setHeader('Access-Control-Expose-Headers', 'ETag, Last-Modified, Content-Length-Source');
// Запрещаем браузеру кешировать API ответы
if (req.path.startsWith('/api/')) {
res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate');
res.setHeader('Pragma', 'no-cache');
res.setHeader('Expires', '0');
}
next();
});