From 3e4a6a896e6d3ccdb700e652d13877f3e1810bfb Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 7 May 2024 13:16:38 +0100 Subject: [PATCH] chore: update docs based on feedback --- packages/astro/src/@types/astro.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 8e20dd06e4d5f..0289fa1b209d4 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -1965,6 +1965,8 @@ export interface AstroUserConfig { * --- * ``` * + * Use `context.rewrite` in your endpoint files to reroute to a different page: + * * ```js * // src/pages/api.js * export function GET(ctx) { @@ -1974,6 +1976,8 @@ export interface AstroUserConfig { * } * ``` * + * Use `next("/")` in your middleware file to reroute to a different page, and still call the next middleware function: + * * ```js * // src/middleware.js * export function onRequest(ctx, next) {