Static GitHub Issues

[2421] Support redirect to route name in middleware

prev: Content Security Policy
next: question about "isServer" in builder.js

In a middleware we can do a redirect with e.g. redirect('/login').

But how can we redirect based on a route name?

redirect({name: 'login'}) is currently not possible.

I think it's a bad idea to do redirects on absolute paths instead of route names.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2100">#c2100</a>)</em></sub></div>