Skip to content

Interface: AstroContext ​

Defined in: packages/astro/src/server.ts:49

The part of Astro's context this package uses. Astro in a page, the context of an endpoint (APIContext) and the context of a middleware all have it. Only request is read by the guards; getSubject and team get the whole object.

Properties ​

PropertyTypeDescriptionDefined in
cookiesobject-packages/astro/src/server.ts:56
cookies.get(key) => | { value: string; } | undefined-packages/astro/src/server.ts:56
localsLocalsApp.Locals: what your auth middleware put there (locals.user).packages/astro/src/server.ts:55
paramsReadonly<Record<string, string | undefined>>The route params: params.teamId on src/pages/teams/[teamId]/....packages/astro/src/server.ts:53
requestRequest-packages/astro/src/server.ts:50
urlURL-packages/astro/src/server.ts:51

Released under the MIT License. Inspired by spatie/laravel-permission.