Assert POST error response security headers in smoke
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
855923ce13
commit
e060cf4fd4
1 file changed
+6
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user