Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
ematipico and sarah11918 authored May 7, 2024
1 parent b067e28 commit cffa77a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1944,9 +1944,19 @@ export interface AstroUserConfig {
* @version 4.8.0
* @description
*
* Enables the use of rewriting features in Astro pages, Endpoints and Astro middleware:
* Enables a routing feature for rewriting requests in Astro pages, Endpoints and Astro middleware, giving you programmatic control over your routes.
*
* ```astro
* ```js
* {
* experimental: {
* rewriting: true,
* },
* }
* ```
*
* Use `Astro.rewrite` in your `.astro` files to reroute to a different page:
*
* ```astro "rewrite"
* ---
* // src/pages/dashboard.astro
* if (!Astro.props.allowed) {
Expand All @@ -1973,6 +1983,8 @@ export interface AstroUserConfig {
* return next();
* }
* ```
*
* For a complete overview, and to give feedback on this experimental API, see the [Rerouting RFC](https://github.com/withastro/roadmap/blob/feat/reroute/proposals/0047-rerouting.md).
*/
rewriting: boolean;
};
Expand Down

0 comments on commit cffa77a

Please sign in to comment.