MCPcopy Create free account
hub / github.com/F12FLASH/CTF / ensureSessionId

Function ensureSessionId

4.Stackless Stack/server/routes.ts:10–15  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

8const rateLimitStore = new Map<string, { count: number; resetTime: number }>();
9
10function ensureSessionId(req: Request): string {
11 if (!req.session.id) {
12 req.session.id = randomUUID();
13 }
14 return req.session.id;
15}
16
17function getRateLimitIdentifier(req: Request): string {
18 if (req.session?.id) {

Callers 2

rateLimitFunction · 0.85
getSessionIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected