Skip to content

fix(web): add baseline security response headers - #1934

Merged
richiemcilroy merged 5 commits into
mainfrom
security/response-headers
Oct 23, 2026
Merged

richiemcilroy merged 5 commits into
mainfrom
security/response-headers

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

Adds baseline security response headers to the web app: X-Content-Type-Options: nosniff and X-DNS-Prefetch-Control: off on every route, and Referrer-Policy: strict-origin-when-cross-origin on every route except /api/auth/*, which sets its own no-referrer on the SSO redirect.

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Adds baseline response headers in apps/web/next.config.mjs:

  • Web responses now get safer defaults while auth keeps its own referrer policy.

No new actionable issues were found. The previous threads have no supplied comment numbers, so they receive no numbered entries above. The DNS-prefetch finding is fixed. richiemcilroy intentionally left framing protection to proxy.ts and #2997 so share pages remain frameable. richiemcilroy also removed HSTS from this PR because Vercel already sends it on cap.so.

Reviews (5) · Last reviewed commit: "fix(web): limit baseline headers to nosn..." · Reviewed by Greptile

@polarityinc

polarityinc Bot commented Jun 19, 2026

Copy link
Copy Markdown

Paragon Review Skipped

Hi @richiemcilroy! Your Polarity credit balance is insufficient to complete this review.

Please visit https://app.paragon.run to finish your review.

Comment thread apps/web/next.config.mjs
Comment thread apps/web/next.config.mjs Outdated
Comment thread apps/web/next.config.mjs Outdated
Comment thread apps/web/next.config.mjs Outdated
@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai please review the PR

@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai please review the PR

Comment thread apps/web/next.config.mjs
Comment thread apps/web/next.config.mjs Outdated
Comment thread apps/web/next.config.mjs Outdated
Comment thread apps/web/next.config.mjs Outdated
@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai please review the PR

Comment thread apps/web/next.config.mjs Outdated
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 23, 2026 10:11pm UTC

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@richiemcilroy
richiemcilroy merged commit 0c51354 into main Oct 23, 2026
39 checks passed

This branch was successfully deployed

2 active deployments
Preview – cap-web — 9987c199 Deployed Oct 23, 2026 by vercel[bot]
Preview – cap-status — 9987c199 Deployed Oct 23, 2026 by vercel[bot]
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