From ca1ce9ba763a56adc4e564f852c806aeae30bac4 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Tue, 24 Oct 2017 17:23:10 +0200 Subject: [PATCH] Dont cache auth --- routes/api/auth/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/api/auth/index.js b/routes/api/auth/index.js index 791573898..1af57fb54 100644 --- a/routes/api/auth/index.js +++ b/routes/api/auth/index.js @@ -12,6 +12,10 @@ router.get('/', (req, res, next) => { return; } + res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate'); + res.header('Expires', '-1'); + res.header('Pragma', 'no-cache'); + // Send back the user object. res.json({user: req.user}); });