MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / setCookieFor

Function setCookieFor

e2e/cloud/auth-session.test.ts:14–19  ·  view source on GitHub ↗
(response: Response, name: string)

Source from the content-addressed store, hash-verified

12
13/** First `Set-Cookie` header for `name`, as the raw header string. */
14const setCookieFor = (response: Response, name: string): string => {
15 for (const header of response.headers.getSetCookie()) {
16 if (header.startsWith(`${name}=`)) return header;
17 }
18 return "";
19};
20
21// state = base64url(JSON { nonce, returnTo? }) — the app's login-state
22// envelope (apps/cloud/src/auth/login-state.ts).

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected