Media / foldkit-media/server

headersFor

function · packages/media/src/server/headers.ts:74

function headersFor(answer: Answer): Readonly<Record<string, string>>

Every response's headers, decided in one place, so the server, the edge and a static host cannot disagree. A variant's URL names its bytes, so it is kept for a year, and so are refusals that cannot change (a malformed URL, an original too large). A missing original may appear, so only a CDN keeps its 404, briefly; a failure is never kept. Every image may be read by a canvas on another origin, and its type is never sniffed.