Loading...
Loading...
Write HTTP security header configs for Cloudflare, Vercel, Netlify, nginx, and Next.js in Claude Code, Codex, Cursor, and other coding agents, covering HSTS, report-only CSP first, frame-ancestors, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. This standalone squirrelscan skill needs no squirrel CLI or hosted squirrelscan MCP server and verifies live headers with curl. Use when asked "add security headers to Next.js", "set up a CSP", or "fix missing HSTS and Referrer-Policy headers".
npx skill4agent add squirrelscan/skills security-headerscurlcurl -sI https://example.com | grep -i -E '^(strict-transport|content-security|x-frame|x-content-type|referrer-policy|permissions-policy|cross-origin|set-cookie)'| Header | Value | Notes |
|---|---|---|
| | HTTPS only. Start with a short |
| | |
| start from | Then allow only what the site really loads. See step 3 |
| | Old browsers. CSP |
| | OWASP proposes |
| | List only features the site does not use; add others as needed |
frame-ancestors https://partner.exampleX-Frame-OptionsContent-Security-Policy-Report-Onlyreport-toreport-uri'unsafe-inline'script-srcstyle-srcimg-srcconnect-srcframe-srcContent-Security-Policynext.config.tsconst headers = [
{ key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{ key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()" },
];
export default { async headers() { return [{ source: "/(.*)", headers }]; } };vercel.json{ "headers": [{ "source": "/(.*)", "headers": [
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "X-Frame-Options", "value": "DENY" },
{ "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
] }] }_headers/*
Strict-Transport-Security: max-age=63072000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()serveralwaysadd_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;add_headerlocation.htaccesscurl -sIsquirrel audit https://example.com --rule-include security/csp,security/hsts,security/x-frame-options,security/x-content-type,security/referrer-policy,security/permissions-policy --passive --format llm--passive--ephemeralsecurity-auditsupabase-security-auditwebsite-ci-gate