Skip to content

Commit

Permalink
Fixing server redirects from 301 (permanent) to 302 (temporary). Perm…
Browse files Browse the repository at this point in the history
…anent redirects mess up with browser caches.
  • Loading branch information
Martin Krulis committed Nov 5, 2017
1 parent 32b2eab commit 0df5a9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0df5a9a

Please sign in to comment.