-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
54 lines (46 loc) · 1.61 KB
/
next.config.js
File metadata and controls
54 lines (46 loc) · 1.61 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
const { withSentryConfig } = require('@sentry/nextjs')
/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
COPILOT_ENV: process.env.COPILOT_ENV,
},
headers: async () => {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value:
"frame-ancestors 'self' https://dashboard.copilot.app https://dashboard.copilot-staging.app https://dashboard.copilot-staging.com https://dashboard.assembly.com https://dashboard.assembly-staging.com https://*.myassembly.com;",
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
],
},
]
},
}
module.exports = withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
// Only print logs for uploading source maps in CI
// Set to `true` to suppress logs
silent: !process.env.CI,
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
tunnelRoute: '/monitoring',
// Automatically create Cron Monitors in Sentry if you have configured Vercel cron jobs
automaticVercelMonitors: true,
authToken: process.env.SENTRY_AUTH_TOKEN,
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
})