refresh issues
This commit is contained in:
@@ -137,3 +137,14 @@ app.listen(PORT, '0.0.0.0', () => {
|
||||
console.log(`TurfTracker API server running on port ${PORT}`);
|
||||
console.log(`Environment: ${process.env.NODE_ENV || 'development'}`);
|
||||
});
|
||||
// Disable etags and set no-store by default to avoid stale cached API responses
|
||||
app.set('etag', false);
|
||||
|
||||
app.use((req, res, next) => {
|
||||
// Allow icon proxy to control its own caching
|
||||
if (req.path && req.path.startsWith('/api/weather/icon')) return next();
|
||||
res.setHeader('Cache-Control', 'no-store');
|
||||
res.setHeader('Pragma', 'no-cache');
|
||||
res.setHeader('Expires', '0');
|
||||
next();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user