onRequest() — astro Function Reference
Architecture documentation for the onRequest() function in middleware.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 395ea483_f90c_e585_2721_b38914857bda["onRequest()"] 947df197_61f5_6433_3704_d6055d393fa8["middleware.ts"] 395ea483_f90c_e585_2721_b38914857bda -->|defined in| 947df197_61f5_6433_3704_d6055d393fa8 style 395ea483_f90c_e585_2721_b38914857bda fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/actions/src/middleware.ts lines 47–52
defineMiddleware((ctx, next) => {
ctx.locals.user = {
name: 'Houston',
};
return next();
}),
Domain
Subdomains
Source
Frequently Asked Questions
What does onRequest() do?
onRequest() is a function in the astro codebase, defined in packages/astro/test/fixtures/actions/src/middleware.ts.
Where is onRequest() defined?
onRequest() is defined in packages/astro/test/fixtures/actions/src/middleware.ts at line 47.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free