Saltearse al contenido

middleware

Esta página aún no está disponible en tu idioma.

const onRequest: any;

Defined in: studiocms/packages/studiocms/src/middleware/index.ts:27^

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.