Skip to content

Commit

Permalink
fix: set no-store cache control on jwt renew response
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed May 24, 2024
1 parent 1238d61 commit 904260f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/core/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ module.exports = {
} else {
res.cookie('jwt', newToken.token, { expires: DateTime.utc().plus({ days: 365 }).toJSDate() })
}

// Avoid caching this response
res.set('Cache-Control', 'no-store')
} catch (errc) {
WIKI.logger.warn(errc)
return next()
Expand Down

1 comment on commit 904260f

@sprayzcs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NGPixel Could you please release a new version with a patch of this bug?

Please sign in to comment.