forked from DOT-Validator-Alliance/dva-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
42 lines (41 loc) · 999 Bytes
/
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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
compiler: {
styledComponents: true,
},
async rewrites() {
return [
{
source: "/robots.txt",
destination: "/api/robots",
},
]
},
async headers() {
return [
{
source: "/(.*)?", // Matches all pages
headers: [
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Content-Security-Policy",
value:
"default-src 'self' 'unsafe-eval' 'unsafe-inline' *.googleapis.com *.gstatic.com; frame-ancestors 'none'; font-src 'self' 'unsafe-eval' data: *.googleapis.com *.gstatic.com; connect-src 'self'"
.replace(/\s{2,}/g, " ")
.trim(),
},
],
},
]
},
}
module.exports = nextConfig