Sfoglia il codice sorgente

fix: set no-store cache control on jwt renew response

Nicolas Giard 1 anno fa
parent
commit
904260fd44
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      server/core/auth.js

+ 3 - 0
server/core/auth.js

@@ -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()