UNPKG

@dudousxd/nestjs-telescope

Version:

Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.

21 lines 1.12 kB
import type { TelescopeSession } from './session-cookie.js'; /** Read the raw `Cookie` request header (Express and Fastify both expose `headers`). */ export declare function readCookieHeader(request: unknown): string | undefined; /** * Decide whether the cookie should carry `Secure`. True when the request is * https directly (`request.protocol === 'https'`) OR a proxy forwarded https * (`x-forwarded-proto` includes 'https'). Defensive structural reads — never * throws, defaults to insecure (works on plain http in dev). */ export declare function isHttpsRequest(request: unknown): boolean; /** A request with the verified session attached for downstream hooks to read. */ export interface RequestWithSession { telescopeSession: TelescopeSession; } /** * Attach the verified session onto the raw request so `authorizer` / * `authorizeAction` hooks can read `request.telescopeSession`. Narrow * structural mutation — avoids an `as` cast at the guard call site. */ export declare function attachSession(request: unknown, session: TelescopeSession): void; //# sourceMappingURL=auth-request.d.ts.map