-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
28 lines (27 loc) · 979 Bytes
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY,
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value: `
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://js.stripe.com;
style-src 'self' 'unsafe-inline';
img-src 'self' data:;
frame-src 'self' https://js.stripe.com http://localhost:3000;
connect-src 'self' https://api.stripe.com;
`.replace(/\s{2,}/g, ' ').trim()
},
],
},
];
},
};
export default nextConfig;