Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const securityHeaders = [
{
key: "X-Frame-Options",
value: "DENY"
},
{
key: "X-Content-Type-Options",
value: "nosniff"
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin"
},
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()"
}
];

const nextConfig = {
async headers() {
return [
{
source: "/:path*",
headers: securityHeaders
}
];
}
};

export default nextConfig;
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "next dev",
"test": "echo \"No web tests configured yet\"",
"test:security-headers": "node scripts/validate-security-headers.mjs",
"lint": "next lint"
},
"dependencies": {
Expand Down
27 changes: 27 additions & 0 deletions apps/web/scripts/validate-security-headers.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import assert from "node:assert/strict";

import nextConfig from "../next.config.mjs";

const requiredHeaders = new Map([
["X-Frame-Options", "DENY"],
["X-Content-Type-Options", "nosniff"],
["Referrer-Policy", "strict-origin-when-cross-origin"],
["Permissions-Policy", "camera=(), microphone=(), geolocation=()"]
]);

assert.equal(typeof nextConfig.headers, "function", "next.config.mjs must define headers()");

const routes = await nextConfig.headers();
const allRoutes = routes.find((route) => route.source === "/:path*");

assert.ok(allRoutes, "security headers must apply to all routes");

const configuredHeaders = new Map(
allRoutes.headers.map((header) => [header.key, header.value])
);

for (const [key, value] of requiredHeaders) {
assert.equal(configuredHeaders.get(key), value, `${key} header is missing or incorrect`);
}

console.log("Security headers configuration is valid.");
13 changes: 10 additions & 3 deletions contributors/agents.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"agents": [],
"last_updated": "2026-06-03",
"total_contributions": 0
"agents": [
{
"name": "OpenAI Codex",
"model": "GPT-5",
"platform": "Codex",
"first_contribution": "2026-06-13"
}
],
"last_updated": "2026-06-13",
"total_contributions": 1
}
Loading