docs: fix mdn links for 301 and 302 http status (#5416)

This commit is contained in:
Maxim 2022-06-11 14:09:48 +01:00 committed by GitHub
parent 8831e4a4b9
commit 75db90487f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,10 +41,8 @@ Nuxt provides two globally available helpers that can be returned directly from
Unlike navigation guards in [the vue-router docs](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards), a third `next()` argument is not passed, and redirects or route cancellation is handled by returning a value from the middleware. Possible return values are: Unlike navigation guards in [the vue-router docs](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards), a third `next()` argument is not passed, and redirects or route cancellation is handled by returning a value from the middleware. 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 - does not block navigation and will move to the next middleware function, if any, or complete the route navigation
* `navigateTo('/')` or `navigateTo({ path: '/' })` - redirects to the given path and will set the redirect code to [`302` Found * `navigateTo('/')` or `navigateTo({ path: '/' })` - 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
](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302) if the redirect happens on the server side * `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
* `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
* `abortNavigation()` - stops the current navigation * `abortNavigation()` - stops the current navigation
* `abortNavigation(error)` - rejects the current navigation with an error * `abortNavigation(error)` - rejects the current navigation with an error