customLogic() — astro Function Reference
Architecture documentation for the customLogic() function in middleware.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 9dc93c35_853d_3fb1_1285_846a618faa1d["customLogic()"] d6cdf5cf_222a_f7c8_e325_2da474778078["middleware.js"] 9dc93c35_853d_3fb1_1285_846a618faa1d -->|defined in| d6cdf5cf_222a_f7c8_e325_2da474778078 style 9dc93c35_853d_3fb1_1285_846a618faa1d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js lines 4–15
const customLogic = defineMiddleware(async (context, next) => {
const url = new URL(context.request.url);
if (url.pathname.startsWith('/about')) {
return new Response('ABOUT ME', {
status: 200,
});
}
const response = await next();
return response;
});
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does customLogic() do?
customLogic() is a function in the astro codebase, defined in packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js.
Where is customLogic() defined?
customLogic() is defined in packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free