Home / File/ middleware.js — astro Source File

middleware.js — astro Source File

Architecture documentation for middleware.js, a javascript file in the astro codebase.

Entity Profile

Relationship Graph

Source Code



export function onRequest(ctx, next) {
	Object.assign(ctx.locals, {
		localsPattern: ctx.routePattern,
		localsPrerendered: ctx.isPrerendered
	});
	return next()
}

Subdomains

Functions

Frequently Asked Questions

What does middleware.js do?
middleware.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in middleware.js?
middleware.js defines 1 function(s): onRequest.
Where is middleware.js in the architecture?
middleware.js is located at packages/astro/test/fixtures/astro-global/src/middleware.js (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/astro-global/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free