MCPcopy Create free account
hub / github.com/QuantiaAI/helm-agents / readCookie

Function readCookie

apps/api/src/auth/auth.controller.ts:11–20  ·  view source on GitHub ↗
(req: Request, name: string)

Source from the content-addressed store, hash-verified

9const COOKIE_PATH = "/api/auth";
10
11function readCookie(req: Request, name: string): string | undefined {
12 const header = req.headers.cookie;
13 if (!header) return undefined;
14 for (const part of header.split(";")) {
15 const eq = part.indexOf("=");
16 if (eq === -1) continue;
17 if (part.slice(0, eq).trim() === name) return decodeURIComponent(part.slice(eq + 1).trim());
18 }
19 return undefined;
20}
21
22@Controller("auth")
23export class AuthController {

Callers 2

refreshMethod · 0.85
logoutMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected