diff --git a/app/app/lib/recesso.server.ts b/app/app/lib/recesso.server.ts index eb76673..0cebd5b 100644 --- a/app/app/lib/recesso.server.ts +++ b/app/app/lib/recesso.server.ts @@ -634,10 +634,22 @@ export async function lookupOrder( } -/** Helper: Response HTML standalone (status 200 di default per non leakare via status). */ +/** + * Response HTML standalone (status 200 di default per non leakare via status). + * + * `no-store`: la pagina contiene numero d'ordine, email e dichiarazione del + * consumatore. Non deve finire nella cache del browser (ne' in quella di un + * proxy intermedio), sia per privacy sia perche' altrimenti il cliente rivede + * una versione vecchia del form dopo un cambio di configurazione. + */ export function htmlResponse(html: string, status = 200): Response { return new Response(html, { status, - headers: { "Content-Type": "text/html; charset=utf-8" }, + headers: { + "Content-Type": "text/html; charset=utf-8", + "Cache-Control": "no-store, no-cache, must-revalidate", + Pragma: "no-cache", + "Referrer-Policy": "no-referrer", + }, }); }