-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
62 lines (61 loc) · 1.64 KB
/
next.config.mjs
File metadata and controls
62 lines (61 loc) · 1.64 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
59
60
61
62
/** @type {import('next').NextConfig} */
const nextConfig = {
poweredByHeader: false,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'strict-transport-security',
value: 'max-age=31536000; includeSubDomains; preload',
},
{
key: 'content-security-policy',
value: `
default-src 'self';
script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval';
style-src 'report-sample' 'self' 'unsafe-inline' https://fonts.googleapis.com;
object-src 'none';
base-uri 'self';
connect-src 'self';
font-src 'self' https://fonts.gstatic.com;
frame-src 'self' https://docs.google.com;
img-src 'self';
manifest-src 'self';
media-src 'self';
worker-src 'none';
`
.replace(/\s+/g, ' ')
.trim(),
},
{
key: 'x-frame-options',
value: 'SAMEORIGIN',
},
{
key: 'x-content-type-options',
value: 'nosniff',
},
{
key: 'referrer-policy',
value: 'strict-origin-when-cross-origin',
},
{
key: 'permissions-policy',
value: `
camera=(),
microphone=(),
geolocation=(),
usb=(),
payment=()
`
.replace(/\s+/g, ' ')
.trim(),
},
],
},
];
},
};
export default nextConfig;