From c217a55d3d3f7ffe980899768ede5c326e39b856 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 01:08:38 +0000 Subject: [PATCH] Assert static POST rejection in smoke test Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index e24c96c20d..bb8e971516 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -175,6 +175,20 @@ async function main() { `Smoke test failed: expected missing asset status 404, received ${missingAsset.status}.`, ); } + const postPage = await fetch(parsedAppUrl, { + method: "POST", + body: "noop", + }); + if (postPage.status !== 405) { + throw new Error(`Smoke test failed: expected POST status 405, received ${postPage.status}.`); + } + if ((postPage.headers.get("allow") ?? "").toLowerCase() !== "get, head") { + throw new Error( + `Smoke test failed: expected Allow header 'GET, HEAD', got ${String( + postPage.headers.get("allow"), + )}.`, + ); + } const headPage = await fetch(parsedAppUrl, { method: "HEAD" }); if (headPage.status !== 200) { throw new Error(