Skip to content

Commit

Permalink
chore: update docs based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed May 7, 2024
1 parent cffa77a commit 3e4a6a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/astro/src/@types/astro.ts
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 3e4a6a8

Please sign in to comment.