Skip to content

Commit

Permalink
Add headers to avoid Redirects being cached
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Apr 23, 2024
1 parent bc19806 commit 0f493bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ server.get('/*', (req, res) => {
}

if (context.url) {
// If there's a redirection, do not cache it
res.set({
'Cache-Control': 'no-cache',
});
res.redirect(flattenToAppURL(context.url));
} else if (context.error_code) {
res.set({
Expand Down

0 comments on commit 0f493bf

Please sign in to comment.