From 0df5a9ab33d29206f445c4a32b7fb60374ad1318 Mon Sep 17 00:00:00 2001 From: Martin Krulis Date: Sun, 5 Nov 2017 22:46:11 +0100 Subject: [PATCH] Fixing server redirects from 301 (permanent) to 302 (temporary). Permanent redirects mess up with browser caches. --- src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 233eec51b..521d6c2af 100644 --- a/src/server.js +++ b/src/server.js @@ -88,7 +88,7 @@ app.get('*', (req, res) => { { history, routes: createRoutes(store.getState), location }, (error, redirectLocation, renderProps) => { if (redirectLocation) { - res.redirect(301, redirectLocation.pathname + redirectLocation.search); + res.redirect(302, redirectLocation.pathname + redirectLocation.search); } else if (error) { // @todo use the 500.ejs view res.status(500).send(error.message);