Change redirect status to 302 (#6562)

As discussed in #6546, changing redirect status to 302, so the redirect is only temporary
This commit is contained in:
Marton Langa 2019-03-07 18:51:45 +07:00 committed by Tim Neutkens
parent cf0552a395
commit 5f003105ef

View file

@ -50,7 +50,7 @@ Profile.getInitialProps = async ctx => {
const redirectOnError = () =>
process.browser
? Router.push('/login')
: ctx.res.writeHead(301, { Location: '/login' }).end()
: ctx.res.writeHead(302, { Location: '/login' }).end()
try {
const response = await fetch(apiUrl, {