Skip to content

Commit 11e2d23

Browse files
authored
chore: add security headers (#7)
Signed-off-by: Will Manning <[email protected]>
1 parent cc55a6e commit 11e2d23

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Development Commands
66

7-
- `npm run dev` - Start development server with Turbopack
8-
- `npm run build` - Build production application
9-
- `npm run lint` - Run ESLint
10-
- `npm start` - Start production server
7+
- `bun run dev` - Start development server with Turbopack
8+
- `bun run build` - Build production application
9+
- `bun run lint` - Run ESLint
10+
- `bun start` - Start production server
1111

1212
## Architecture Overview
1313

next.config.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,27 @@ import type { NextConfig } from "next";
22
import { withPlausibleProxy } from "next-plausible";
33

44
const nextConfig: NextConfig = withPlausibleProxy()({
5-
/* config options here */
5+
async headers() {
6+
return [
7+
{
8+
source: '/(.*)',
9+
headers: [
10+
{
11+
key: 'X-Content-Type-Options',
12+
value: 'nosniff',
13+
},
14+
{
15+
key: 'X-Frame-Options',
16+
value: 'DENY',
17+
},
18+
{
19+
key: 'Content-Security-Policy',
20+
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' plausible.io; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' plausible.io vitals.vercel-insights.com; worker-src 'self' blob:; child-src 'self' blob:;",
21+
},
22+
],
23+
},
24+
];
25+
},
626
});
727

828
export default nextConfig;

0 commit comments

Comments
 (0)