Add nosniff header for static runtime responses

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 00:54:51 +00:00
1 parent 9bc6b6529a
commit 31733ba5c0
2 files changed
+4

No files matched your search

+3
View File
@@ -165,6 +165,9 @@ async function main() {
if (page.status !== 200) {
throw new Error(`Smoke test failed: expected web status 200, received ${page.status}.`);
}
if (page.headers.get("x-content-type-options") !== "nosniff") {
throw new Error("Smoke test failed: expected x-content-type-options=nosniff.");
}
const wsUrl = parsedAppUrl.searchParams.get("ws");
if (!wsUrl) {
+1
View File
@@ -552,6 +552,7 @@ function startStaticWebServer(distRoot: string, port: number) {
response.statusCode = 200;
response.setHeader("Content-Type", contentTypeFor(targetPath));
response.setHeader("X-Content-Type-Options", "nosniff");
response.end(content);
});
});