From 9d8d50f1a7df616a8af37fba2c07b1ce63f45909 Mon Sep 17 00:00:00 2001 From: Mohammad Kermani Date: Tue, 29 Apr 2025 12:33:57 +0000 Subject: [PATCH] fix: Add CSP header for WalletConnect --- next.config.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/next.config.ts b/next.config.ts index a849f5b..92eae2b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -9,6 +9,20 @@ const nextConfig: NextConfig = { config.externals.push('pino-pretty', 'lokijs', 'encoding'); return config; }, + async headers() { + return [ + { + source: '/:path*', + headers: [ + { + key: 'Content-Security-Policy', + value: + "frame-ancestors 'self' https://secure-mobile.walletconnect.com https://secure-mobile.walletconnect.org https://secure.walletconnect.org", + }, + ], + }, + ]; + }, }; export default withAxiom(nextConfig);