-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnext.config.js
More file actions
102 lines (101 loc) · 3.01 KB
/
next.config.js
File metadata and controls
102 lines (101 loc) · 3.01 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
trailingSlash: false,
poweredByHeader: false,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'pbs.twimg.com'
}
]
},
skipTrailingSlashRedirect: true,
async rewrites() {
return [
{
source: '/ingest/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
{
source: '/ingest/decide',
destination: 'https://us.i.posthog.com/decide',
},
]
},
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Content-Security-Policy',
value: `
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval'
https://js.stripe.com
https://*.stripe.com
https://www.googletagmanager.com
https://vercel.live
https://www.google-analytics.com
https://*.vercel.live
https://assets.calendly.com
https://app.cal.com
https://cal.com
https://embed.cal.com
https://*.cal.com
https://formnx.com;
style-src 'self' 'unsafe-inline' data:
https://fonts.googleapis.com
https://assets.calendly.com
https://app.cal.com
https://cal.com
https://*.cal.com;
font-src * data: blob: 'unsafe-inline';
img-src 'self' data: https: blob:;
frame-src 'self'
https://js.stripe.com
https://*.stripe.com
https://hooks.stripe.com
https://www.google.com
https://vercel.live
https://*.vercel.live
https://calendly.com
https://*.calendly.com
https://app.cal.com
https://cal.com
https://embed.cal.com
https://*.cal.com
https://fill.formnx.com;
connect-src 'self'
https://api.stripe.com
https://js.stripe.com
https://www.google-analytics.com
https://vercel.live
https://*.vercel.live
https://app.cal.com
https://cal.com
https://embed.cal.com
https://api.cal.com
https://*.cal.com
https://raw.githubusercontent.com;
media-src 'self';
object-src 'none';
base-uri 'self';
form-action 'self';
manifest-src 'self';
worker-src 'self' blob:;
`.replace(/\s+/g, ' ').trim()
}
]
}
]
}
}
module.exports = nextConfig