Skip to content

chore(security): add HSTS, nosniff, Referrer-Policy and Permissions-Policy headers - #1465

Open
rajanpanth wants to merge 1 commit into
SuperteamDAO:mainfrom
rajanpanth:pr1-security-headers
Open

chore(security): add HSTS, nosniff, Referrer-Policy and Permissions-Policy headers#1465
rajanpanth wants to merge 1 commit into
SuperteamDAO:mainfrom
rajanpanth:pr1-security-headers

Conversation

@rajanpanth

@rajanpanth rajanpanth commented Aug 12, 2026

Copy link
Copy Markdown

Adds standard hardening response headers alongside the existing X-Frame-Options and CSP on the global /:path* matcher:

  • Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  • X-Content-Type-Options: nosniff
  • Referrer-Policy: strict-origin-when-cross-origin
  • Permissions-Policy: camera=(), microphone=(), geolocation=()

Purely additive; no behavioural change to any route.

pnpm check-types and pnpm lint pass.

Summary by CodeRabbit

  • Security
    • Added response headers that strengthen content handling, referrer privacy, browser feature permissions, and HTTPS enforcement.

…olicy headers

Adds standard hardening response headers alongside the existing
X-Frame-Options and CSP on the global /:path* matcher:
- Strict-Transport-Security (HSTS, 2y + preload)
- X-Content-Type-Options: nosniff
- Referrer-Policy: strict-origin-when-cross-origin
- Permissions-Policy: camera/microphone/geolocation denied
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@rajanpanth is attempting to deploy a commit to the Superteam Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 848fba62-332b-4d31-a4c7-f4d19f308400

📥 Commits

Reviewing files that changed from the base of the PR and between af39bd1 and 555691c.

📒 Files selected for processing (1)
  • next.config.ts

Walkthrough

The Next.js configuration adds four security response headers to the default /:path* route. The headers control MIME sniffing, referrer data, browser permissions, and HTTPS enforcement.

Changes

Security response headers

Layer / File(s) Summary
Default security header configuration
next.config.ts
The default route configuration adds X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and Strict-Transport-Security headers.

Estimated code review effort: 2 (Simple) | ~5 minutes

Poem

A rabbit checks each guarded gate,
With headers lined up straight.
No sniffing here, no camera call,
HTTPS watches over all.
Referrers hush, permissions rest—
Secure burrows pass the test.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the security headers added by the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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