-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
47 lines (44 loc) · 2.93 KB
/
Copy pathnext.config.js
File metadata and controls
47 lines (44 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer }) => {
// Exclude problematic dependency from server-side bundle
if (isServer) {
config.externals.push('@react-native-async-storage/async-storage');
}
return config;
},
transpilePackages: ['@uiw/react-md-editor', '@uiw/react-markdown-preview'],
images: {
domains: ['ipfs.io', 'cdn.zerion.io'],
},
reactStrictMode: true,
// Only use standalone output in production builds (causes webpack issues in dev)
...(process.env.NODE_ENV === 'production' && { output: 'standalone' }),
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Content-Security-Policy',
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-eval' 'unsafe-inline' https://*.walletconnect.com https://*.walletconnect.org https://*.web3modal.org",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://*.walletconnect.com https://*.walletconnect.org",
"font-src 'self' https://fonts.gstatic.com https://fonts.reown.com data: blob:",
"img-src 'self' data: blob: https: https://walletconnect.org https://walletconnect.com https://secure.walletconnect.com https://secure.walletconnect.org https://tokens-data.1inch.io https://tokens.1inch.io https://ipfs.io https://cdn.zerion.io",
"connect-src 'self' https://rpc.walletconnect.com https://rpc.walletconnect.org https://relay.walletconnect.com https://relay.walletconnect.org wss://relay.walletconnect.com wss://relay.walletconnect.org https://pulse.walletconnect.com https://pulse.walletconnect.org https://keys.walletconnect.com https://keys.walletconnect.org https://notify.walletconnect.com https://notify.walletconnect.org https://echo.walletconnect.com https://echo.walletconnect.org https://push.walletconnect.com https://push.walletconnect.org https://*.walletconnect.com https://*.walletconnect.org https://*.reown.com https://*.web3modal.org https://api.web3modal.com https://api.web3modal.org https://cca-lite.coinbase.com wss://*.walletconnect.com wss://*.walletconnect.org",
"frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://*.walletconnect.com https://*.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org",
"frame-ancestors 'self' http://localhost:* https://*.walletconnect.com https://*.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org https://secure-mobile.walletconnect.com https://secure-mobile.walletconnect.org https://*.reown.com https://*.pages.dev https://*.vercel.app https://*.ngrok-free.app",
].join('; '),
},
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin-allow-popups',
},
],
},
]
},
}
module.exports = nextConfig