Skip to content

fix: add CSP headers to Next.js app (#127)#358

Open
FaithOnuh wants to merge 2 commits into
AnnabelJoe:mainfrom
FaithOnuh:fix/issue-127-csp-headers
Open

fix: add CSP headers to Next.js app (#127)#358
FaithOnuh wants to merge 2 commits into
AnnabelJoe:mainfrom
FaithOnuh:fix/issue-127-csp-headers

Conversation

@FaithOnuh
Copy link
Copy Markdown
Contributor

This PR resolves #127 by adding Content Security Policy (CSP) headers to the Next.js application via next.config.ts.

Changes

  • Added CSP headers in apps/web/next.config.ts using Content-Security-Policy-Report-Only as requested.
  • Fixed several build errors in the web app and stellar package:
    • Replaced deprecated SorobanRpc with rpc in @stellar/stellar-sdk.
    • Added missing @noble/ed25519 dependency.
    • Fixed type errors in Supabase client calls.
    • Updated @noble/ed25519 verify usage for v3 (synchronous).

Acceptance Criteria

  • CSP header set via next.config.js headers()
  • Policy restricts script-src to self and trusted CDNs
  • Report-only mode first
  • Verified build compiles successfully (type-check passes)

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 Content Security Policy headers to Next.js app

1 participant