studiocms
Version:
Astro Native CMS for AstroDB. Built from the ground up by the Astro community.
11 lines (10 loc) • 574 B
TypeScript
/**
* Main middleware sequence for StudioCMS.
*
* This middleware sets up the base context locals for StudioCMS, including the generator version,
* site configuration, route map, and default language. It also handles user session data,
* email verification status, and user permission levels for the dashboard routes.
* Additionally, it manages CSRF token setup for the editor and ensures that the user is authenticated
* for dashboard routes, redirecting to the login page if not authenticated.
*/
export declare const onRequest: import("astro").MiddlewareHandler;