Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: middleware and virtual routes #7254

Merged
merged 12 commits into from
Mar 11, 2024
Prev Previous commit
Next Next commit
Update src/content/docs/en/guides/middleware.mdx
  • Loading branch information
lilnasy authored Mar 8, 2024
commit 1f9beb50fb65e6cdec343fac74e111d7e77fc424
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Middleware is available in both SSG and SSR Astro projects.
:::note
On all prerendered pages, the middleware runs only during the **build process** to create static pages and does not run in the deployed website. This applies to all pages in a `static` (SSG) project. This also includes prerendered pages in `hybrid` mode (default) and any pages in `server` mode with `export const prerender = true`, including 404 and 500 pages.

For on-demand rendered pages in `server` (default) or `hybrid` (with `export const prerender = false`) mode, the middleware runs in the deployed website when the route is requested. If a route is not found, the middleware will run for the 404 page, unless it is prerendered.
For on-demand rendered pages in `server` (default) or `hybrid` (with `export const prerender = false`) mode, the middleware runs in the deployed website when the route is requested. If a route is not found, the middleware will run for the 404 page, unless it is prerendered. Some adapters may show a platform-specific 404 page instead, in which case the middleware will not run.
:::

## Basic Usage
Expand Down
Loading