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

Function html

telemetry-dashboard/src/index.ts:76–92  ·  view source on GitHub ↗
(body: string, init: ResponseInit & { nonce?: string } = {})

Source from the content-addressed store, hash-verified

74}
75
76function html(body: string, init: ResponseInit & { nonce?: string } = {}): Response {
77 const { nonce, headers, ...rest } = init;
78 return withSecurityHeaders(
79 new Response(body, {
80 ...rest,
81 headers: headersWith(
82 {
83 'content-type': 'text/html; charset=utf-8',
84 // Never let a page render from cache after sign-out.
85 'cache-control': 'no-store',
86 },
87 headers,
88 ),
89 }),
90 nonce,
91 );
92}
93
94function json(body: unknown, init: ResponseInit = {}): Response {
95 const { headers, ...rest } = init;

Callers 2

handleLoginPageFunction · 0.85
failFunction · 0.85

Calls 2

withSecurityHeadersFunction · 0.85
headersWithFunction · 0.85

Tested by

no test coverage detected