-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
56 lines (54 loc) · 1.64 KB
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
const CSPHeaders =
"media-src 'self'; " +
"img-src 'self'; " +
"font-src 'self'; " +
"child-src 'self'; " +
"frame-src 'self'; " +
"worker-src 'none'; " +
"script-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
"style-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
"object-src 'none'; " +
"base-uri 'self'; " +
"form-action 'self'; " +
"upgrade-insecure-requests; " +
"frame-ancestors 'none';";
const nextConfig = {
async headers() {
return [{
source: "/",
headers: [{
key: "Content-Security-Policy",
value: CSPHeaders,
}, {
key: "Access-Control-Allow-Origin",
value: "https://verivote.eu",
}, {
key: "Access-Control-Allow-Methods",
value: "GET, POST, PUT, DELETE",
}, {
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains",
}, {
key: "X-Frame-Options",
value: "SAMEORIGIN",
}, {
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
}, {
key: "Referrer-Policy",
value: "no-referrer",
}, {
key: "X-Content-Type-Options",
value: "nosniff",
}, {
key: "X-DNS-Prefetch-Control",
value: "on",
}],
}];
},
eslint: {
ignoreDuringBuilds: true,
},
};
export default nextConfig;