-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
48 lines (45 loc) · 1.15 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
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants');
module.exports = {
reactStrictMode: true,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value: [
"default-src 'self'",
"object-src 'none'",
"style-src 'unsafe-inline' 'self'",
`script-src ${PHASE_DEVELOPMENT_SERVER ? "'unsafe-eval'" : ""} 'self'`,
"connect-src 'self' https://api.bitbucket.org/",
"form-action 'none'",
"frame-ancestors 'none'",
].join(';'),
},
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin',
},
{
key: 'Referrer-Policy',
value: 'no-referrer',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-DNS-Prefetch-Control',
value: 'off',
},
{
key: 'X-Frame-Options',
value: 'deny',
},
],
},
];
},
};