Skip to content

Add security headers (CSP, XCTO, XFO, Referrer-Policy, Permissions-Policy) - #52

Open
mptfire wants to merge 1 commit into
zig-nostr:mainfrom
mptfire:chore/security-headers
Open

mptfire wants to merge 1 commit into
zig-nostr:mainfrom
mptfire:chore/security-headers

Conversation

@mptfire

@mptfire mptfire commented Nov 15, 2026

Copy link
Copy Markdown

What

The site ships no Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy or Permissions-Policy today. This adds them at the edge for every route via vercel.json.

Notes

  • CSP allows unsafe-inline for scripts/styles because the Next.js/Nextra build inlines bootstrap tags and styles; the site loads no third-party origins, so no other src entries are needed.
  • frame-ancestors 'none' + X-Frame-Options: DENY: docs pages embed nothing.
  • HSTS is already sent by Vercel; includeSubDomains/preload deliberately not added — please confirm there are no other services on apex subdomains first.
  • Findings context: full security/privacy audit of the org repos, 2026-11-15. Related PRs: fetch max_redirects/user_agent options (native), plaza fetch hardening, privacy docs page.

Happy to adjust the CSP policy if you prefer a stricter split (report-only first, etc.).

The site ships no CSP, no XCTO, no frame/referrer policy today.
This adds them at the edge for every route. CSP allows inline
scripts/styles because Next.js/Nextra bootstrap inline tags; no
third-party origins are needed (the site loads none). HSTS is
already sent by Vercel; includeSubDomains is left out deliberately
- confirm no other services on the apex's subdomains before adding
it or the preload directive.
@vercel

vercel Bot commented Nov 15, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the himmelio's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mptfire
mptfire marked this pull request as ready for review November 16, 2026 22:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant