Skip to content

Commit 08acfa1

Browse files
fix(security): add CSP report-only header and security headers
- Add Content-Security-Policy-Report-Only via vercel.json headers to capture violations without breaking existing functionality - Add X-Content-Type-Options, X-Frame-Options, and Referrer-Policy headers
1 parent 5957e47 commit 08acfa1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

vercel.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
{
2+
"headers": [
3+
{
4+
"source": "/(.*)",
5+
"headers": [
6+
{
7+
"key": "Content-Security-Policy-Report-Only",
8+
"value": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https: blob:; connect-src 'self' https: wss:; frame-ancestors 'none'; report-uri /csp-report"
9+
},
10+
{
11+
"key": "X-Content-Type-Options",
12+
"value": "nosniff"
13+
},
14+
{
15+
"key": "X-Frame-Options",
16+
"value": "DENY"
17+
},
18+
{
19+
"key": "Referrer-Policy",
20+
"value": "strict-origin-when-cross-origin"
21+
}
22+
]
23+
}
24+
],
225
"rewrites": [
326
{
427
"source": "/(.*)",

0 commit comments

Comments
 (0)