Assert POST error response security headers in smoke

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:27:25 +00:00
1 parent 855923ce13
commit e060cf4fd4
1 file changed
+6
+6
View File
@@ -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(