Feature Description
Add HTTP security headers to the application via the headers() function in next.config.ts.
Problem It Solves
Currently, the app sends no HTTP security headers, leaving it vulnerable to common web attacks such as:
- Clickjacking — the site can be embedded in iframes on malicious pages
- MIME sniffing — browsers may misinterpret response content types
- Excessive data leakage — referrer headers expose more info than needed
Proposed Solution
Update next.config.ts to include an async headers() function that applies the following headers to all routes (/(.*)):
X-Frame-Options: SAMEORIGIN — prevents clickjacking
X-Content-Type-Options: nosniff — stops MIME sniffing
Referrer-Policy: strict-origin-when-cross-origin — limits referrer leakage
Permissions-Policy — disables unused browser APIs (camera, mic, geolocation)
X-DNS-Prefetch-Control: on — allows DNS prefetching for performance
I'd like to work on this as part of GSSoC 26. Could a maintainer please assign this issue to me?
Feature Description
Add HTTP security headers to the application via the
headers()function innext.config.ts.Problem It Solves
Currently, the app sends no HTTP security headers, leaving it vulnerable to common web attacks such as:
Proposed Solution
Update
next.config.tsto include an asyncheaders()function that applies the following headers to all routes (/(.*)):X-Frame-Options: SAMEORIGIN— prevents clickjackingX-Content-Type-Options: nosniff— stops MIME sniffingReferrer-Policy: strict-origin-when-cross-origin— limits referrer leakagePermissions-Policy— disables unused browser APIs (camera, mic, geolocation)X-DNS-Prefetch-Control: on— allows DNS prefetching for performanceI'd like to work on this as part of GSSoC 26. Could a maintainer please assign this issue to me?