UNPKG

@dudousxd/nestjs-telescope

Version:

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

22 lines 1.06 kB
/** * Parse a raw `Cookie` request header into a name→value map. Dependency-free so * it works on raw Express AND Fastify requests without `cookie-parser`. Values * are URL-decoded; malformed segments are skipped, never thrown. */ export declare function parseCookieHeader(header: string | undefined): Record<string, string>; export interface SetCookieOptions { path: string; /** Cookie lifetime in seconds. Ignored (and forced to 0) when `clear` is set. */ maxAgeSeconds: number; /** Add `Secure` when the request is https. */ secure: boolean; /** Clear the cookie: empty value + `Max-Age=0` (and `Expires` in the past). */ clear?: boolean; } /** * Serialize a `Set-Cookie` header value. Always `HttpOnly` + `SameSite=Lax` * (Lax blocks cross-site POSTs carrying the cookie — CSRF coverage for the * dashboard's mutation POSTs). Platform-agnostic: just a string. */ export declare function serializeSetCookie(name: string, value: string, options: SetCookieOptions): string; //# sourceMappingURL=cookie-header.d.ts.map