MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / wantsHtml

Function wantsHtml

apps/worker/src/boot-debug.ts:53–55  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

51// Browsers send an explicit `text/html` accept, curl sends `*/*`. Listing json
52// first means the wildcard falls back to json while a browser still gets html.
53function wantsHtml(req: Request) {
54 return req.accepts(['json', 'html']) === 'html';
55}
56
57function renderHtml(jobs: { type: string; url: string }[], message?: string) {
58 const links = jobs

Callers 1

bootDebugRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected