docs: fix other issues with routeRules example

This commit is contained in:
Daniel Roe 2023-10-17 09:55:03 +01:00
parent b9cb08cdac
commit 818dc626cf

View File

@ -67,8 +67,8 @@ Nitro has a powerful feature called `routeRules` which allows you to define a se
export default defineNuxtConfig({
routeRules: {
'/': { prerender: true }, // Generated at build time for SEO purpose
'/api/*': { cache: { maxAge: 60 * 60 } } // Cached for 1 hour
'/old-page': { redirect: { to: '/new-page', status: 302 } } // Redirection to avoid 404
'/api/*': { cache: { maxAge: 60 * 60 } }, // Cached for 1 hour
'/old-page': { redirect: { to: '/new-page', statusCode: 302 } } // Redirection to avoid 404
// ...
}
})