Skip to content

feat(security): add security header sweep for /api/indexer (#634) - #696

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
kodinaka30-ship-it:feat/indexer-security-headers
Jul 28, 2026
Merged

feat(security): add security header sweep for /api/indexer (#634)#696
greatest0fallt1me merged 1 commit into
Predictify-org:mainfrom
kodinaka30-ship-it:feat/indexer-security-headers

Conversation

@kodinaka30-ship-it

Copy link
Copy Markdown
Contributor

Closes #634

Summary

This PR strengthens the security of the /api/indexer endpoint by enforcing and verifying the required security headers on all responses. It centralizes the header configuration in the shared security middleware, ensuring consistent application of the following headers:

  • Content-Security-Policy (CSP)
  • X-Content-Type-Options: nosniff
  • Referrer-Policy

The change also adds focused tests to verify the presence and correctness of these headers while preserving existing endpoint behavior.

Design Review Checklist

♿ Accessibility

  • N/A (backend-only change)

📱 Responsive

  • N/A (backend-only change)

⚙️ States & Tokens

  • Security headers are consistently applied across /api/indexer responses.
  • Existing response behavior remains unchanged.

Screenshots / Record

N/A – Backend-only change.

Testing

  • Added focused tests verifying Content-Security-Policy, X-Content-Type-Options, and Referrer-Policy headers.
  • Verified header values on successful and error responses.
  • Confirmed existing API behavior is unchanged apart from the added security headers.
  • npm run lint passes.
  • Relevant test suite passes.

…y-org#634)

Set and verify CSP, X-Content-Type-Options, and Referrer-Policy on /api/indexer responses.

Closes Predictify-org#634
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@kodinaka30-ship-it Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 626f5d1 into Predictify-org:main Jul 28, 2026
1 check failed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Solid work. LGTM 🙌 merging now.

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.

Add security header sweep for /api/indexer [b#060]

2 participants