-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathnext.config.js
More file actions
58 lines (56 loc) · 1.39 KB
/
next.config.js
File metadata and controls
58 lines (56 loc) · 1.39 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
module.exports = {
webpack: (config, { isServer }) => {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
// by next.js will be dropped. Doesn't make much sense, but how it is
fs: false, // the solution
};
return config;
}
return config
},
poweredByHeader: false,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'strict-transport-security',
value: 'max-age=31536000; includeSubDomains; preload',
},
{
key: 'x-dns-prefetch-control',
value: 'on',
},
{
key: 'x-xss-protection',
value: '1; mode=block',
},
{
key: 'x-permitted-cross-domain-policies',
value: 'none',
},
{
key: 'x-frame-options',
value: 'SAMEORIGIN',
},
{
key: 'x-download-options',
value: 'noopen',
},
{
key: 'x-content-type-options',
value: 'nosniff',
},
{
key: 'referrer-policy',
value: 'strict-origin-when-cross-origin',
},
],
},
]
}
}