From 0465d7ffad6a182751759f2ed1b9fb963d21a4fb Mon Sep 17 00:00:00 2001 From: nmemmert Date: Wed, 14 Jan 2026 15:45:06 -0500 Subject: [PATCH] fix: Add cache-control headers to GET /api/settings to prevent browser caching - Settings were being cached by browser, causing stale values on refresh - Added no-store, no-cache, must-revalidate headers - Ensures fresh settings are always fetched from database --- server/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/index.js b/server/index.js index 0fd2407..dfc58f7 100644 --- a/server/index.js +++ b/server/index.js @@ -516,6 +516,11 @@ app.post('/api/notifications/clear', (req, res) => { // Get settings app.get('/api/settings', (req, res) => { + // Prevent browser caching - always fetch fresh data + res.set('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate'); + res.set('Pragma', 'no-cache'); + res.set('Expires', '0'); + // Try to get settings from database first, fallback to process.env try { const dbSettings = {};