-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
45 lines (44 loc) · 1.47 KB
/
next.config.js
File metadata and controls
45 lines (44 loc) · 1.47 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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Mark native modules as external (moved from experimental in Next.js 16)
serverExternalPackages: ['ssh2', 'simple-git'],
// Empty turbopack config to acknowledge Turbopack is enabled by default
turbopack: {},
// Exclude the data directory from production build output tracing.
// The data/ directory contains the SQLite database and sockets at runtime
// and should not be included in the build output.
outputFileTracingExcludes: {
'/*': ['./data/**/*'],
},
async headers() {
return [
{
source: '/:path*',
headers: [
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{
key: 'Content-Security-Policy',
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-inline'",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob:",
"font-src 'self' data:",
"media-src 'self' blob:",
"connect-src 'self'",
"manifest-src 'self'",
"object-src 'none'",
"base-uri 'self'",
"form-action 'self'",
"frame-ancestors 'none'",
].join('; '),
},
],
},
];
},
};
module.exports = nextConfig;