Home

Issue: 2413

how to redirect page in nuxtServerInit function

[issue link]

async nuxtServerInit({ commit }, { req},{ router }) {

if (token) {
if(req.url == ‘/login’){
router.redirect(’/’)
}
}

router is not undefind

This question is available on Nuxt.js community (#c2093)