-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.js
55 lines (52 loc) · 1.49 KB
/
next.config.js
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
const { i18n } = require('./next-i18next.config');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
});
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n,
poweredByHeader: false,
eslint: {
ignoreDuringBuilds: true
},
publicRuntimeConfig: {
// Will be available on both server and client
logLevel: process.env['NEXT_PUBLIC_LOGS_LEVEL'],
environment: process.env['NEXT_PUBLIC_ENVIRONMENT']
},
async headers() {
return [
{
source: '/(.*?)',
headers: [
{
key: 'Content-Security-Policy',
value:
"default-src 'self'; connect-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: *; script-src 'self' 'unsafe-eval' 'unsafe-inline' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-src 'self' *;"
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains'
},
{
key: 'X-Content-Type-Options',
value: 'nosniff'
},
{
key: 'X-Frame-Options',
value: 'sameorigin'
},
{
key: 'X-XSS-Protection',
value: '1; mode=block'
},
{
key: 'Cross-Origin-Resource-Policy',
value: 'same-site'
}
]
}
];
}
};
module.exports = withBundleAnalyzer(nextConfig);