Heure serveur: 2026-06-15T19:18:05.061Z
Identifiant de requête: req_mqflin0l
curl -sI https://demo.bext.dev/examples/headers
Vous devriez voir x-server-time, x-request-id, content-language: en et cache-control: no-store dans les en-têtes de la réponse.
// src/app/examples/headers/page.tsx (loader)
//
// To set custom response headers from a page, the loader returns a
// Response wrapping the full HTML. The PRISM dispatcher preserves the
// status and headers from the loader's Response verbatim.
export async function loader({ request }: LoaderArgs) {
const reqId = "req_" + Date.now().toString(36);
const body =
`<h1>Server time: ${new Date().toISOString()}</h1>` +
`<p>Request id: ${reqId}</p>`;
return new Response(body, {
status: 200,
headers: {
"content-type": "text/html; charset=utf-8",
"cache-control": "no-store",
"x-server-time": new Date().toISOString(),
"x-request-id": reqId,
"content-language": "en",
"x-bext-demo": "headers",
},
});
}