← Public packages
@kentcdodds/package-app-kit
Design tokens, PWA install/update, About/version, cache helpers, and optional realtime notes sync for Kody package apps.
export const REQUEST_ID_HEADER = 'x-request-id'
export function createRequestId(): string {
return crypto.randomUUID()
}
export function withRequestId(response: Response, requestId: string): Response {
const headers = new Headers(response.headers)
headers.set(REQUEST_ID_HEADER, requestId)
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers,
})
}