From e060cf4fd4929081d02e62a856ec58e90202d6c9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 01:27:25 +0000 Subject: [PATCH] Assert POST error response security headers in smoke Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 491ad3c2de..5c8ef7fe59 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -222,6 +222,12 @@ async function main() { )}.`, ); } + if ((postPage.headers.get("cache-control") ?? "").toLowerCase() !== "no-store") { + throw new Error("Smoke test failed: expected cache-control=no-store on POST response."); + } + if ((postPage.headers.get("x-content-type-options") ?? "").toLowerCase() !== "nosniff") { + throw new Error("Smoke test failed: expected nosniff on POST response."); + } const headPage = await fetch(parsedAppUrl, { method: "HEAD" }); if (headPage.status !== 200) { throw new Error(