Skip to content

Commit

Permalink
Edited cache control (#700)
Browse files Browse the repository at this point in the history
- HTTP cache control header is set to no-cache, no-store, must-revalidate.
Browser cache is set to no-cache, no-store, must-revalidate.
  • Loading branch information
hawkishpolicy authored Oct 24, 2024
1 parent d67ba64 commit 98306bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/scripts/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ app.use(

//Middleware to set Cache-Control headers
app.use((req, res, next) => {
res.setHeader('Cache-Control', 'private, max-age=3600');
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
next();
});

Expand All @@ -83,7 +83,7 @@ app.use(
res.setHeader('Content-Type', 'application/javascript');
}
},
maxAge: 'no-cache'
maxAge: 'no-cache, no-store, must-revalidate'
})
);

Expand Down

0 comments on commit 98306bc

Please sign in to comment.