mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: fix other issues with routeRules
example
This commit is contained in:
parent
b9cb08cdac
commit
818dc626cf
@ -67,8 +67,8 @@ Nitro has a powerful feature called `routeRules` which allows you to define a se
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
routeRules: {
|
routeRules: {
|
||||||
'/': { prerender: true }, // Generated at build time for SEO purpose
|
'/': { prerender: true }, // Generated at build time for SEO purpose
|
||||||
'/api/*': { cache: { maxAge: 60 * 60 } } // Cached for 1 hour
|
'/api/*': { cache: { maxAge: 60 * 60 } }, // Cached for 1 hour
|
||||||
'/old-page': { redirect: { to: '/new-page', status: 302 } } // Redirection to avoid 404
|
'/old-page': { redirect: { to: '/new-page', statusCode: 302 } } // Redirection to avoid 404
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user