MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / redirect

Function redirect

telemetry-dashboard/src/index.ts:110–119  ·  view source on GitHub ↗
(location: string, init: ResponseInit = {})

Source from the content-addressed store, hash-verified

108}
109
110function redirect(location: string, init: ResponseInit = {}): Response {
111 const { headers, status, ...rest } = init;
112 return withSecurityHeaders(
113 new Response(null, {
114 ...rest,
115 status: status ?? 302,
116 headers: headersWith({ location, 'cache-control': 'no-store' }, headers),
117 }),
118 );
119}
120
121/**
122 * Only same-origin absolute paths survive, so `?next=` can never become an open

Callers 4

loginRedirectFunction · 0.85
handleLoginPageFunction · 0.85
handleLoginSubmitFunction · 0.85
fetchFunction · 0.85

Calls 2

withSecurityHeadersFunction · 0.85
headersWithFunction · 0.85

Tested by

no test coverage detected