middleware
此内容尚不支持你的语言。
Variables
Section titled “Variables”onRequest
Section titled “onRequest”const onRequest: any;
Defined in: studiocms/packages/studiocms/src/middleware/index.ts:39^
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.