mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
docs: highlight the possibility of middleware to return nothing (#24241)
This commit is contained in:
parent
3fba516073
commit
16bd1eca1f
@ -50,7 +50,7 @@ Unlike [navigation guards](https://router.vuejs.org/guide/advanced/navigation-gu
|
||||
|
||||
Possible return values are:
|
||||
|
||||
* nothing - does not block navigation and will move to the next middleware function, if any, or complete the route navigation
|
||||
* nothing (a simple `return` or no return at all) - does not block navigation and will move to the next middleware function, if any, or complete the route navigation
|
||||
* `return navigateTo('/')` - redirects to the given path and will set the redirect code to [`302` Found](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302) if the redirect happens on the server side
|
||||
* `return navigateTo('/', { redirectCode: 301 })` - redirects to the given path and will set the redirect code to [`301` Moved Permanently](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301) if the redirect happens on the server side
|
||||
* `return abortNavigation()` - stops the current navigation
|
||||
|
Loading…
Reference in New Issue
Block a user