-
Notifications
You must be signed in to change notification settings - Fork 17
/
next.config.js
61 lines (60 loc) · 1.47 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
49
50
51
52
53
54
55
56
57
58
59
60
61
const securityHeaders = [
{
key: "Content-Security-Policy",
value:
`default-src 'none';` +
`base-uri 'none';` +
`child-src 'self' app.netlify.com;` +
`form-action 'none';` +
`frame-ancestors 'none';` +
`img-src 'self' data:;` +
`media-src 'self';` +
`object-src 'none';` +
`script-src 'self' app.netlify.com netlify-cdp-loader.netlify.app ${
process.env.NODE_ENV === "development" ? `'unsafe-eval'` : ""
};` +
`style-src 'self' fonts.googleapis.com 'unsafe-inline';` +
`font-src fonts.gstatic.com data:;` +
`connect-src 'self' ocean.defichain.com 35.241.191.23:3000 *.jellyfishsdk.com playground.jellyfishsdk.com wallet.defichain.com ${
process.env.NODE_ENV === "development"
? `ws://localhost:3000/_next/webpack-hmr`
: ""
};`,
},
{
key: "Referrer-Policy",
value: "same-origin",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
];
module.exports = {
experimental: {
forceSwcTransforms: true,
},
swcMinify: true,
reactStrictMode: true,
pageExtensions: ["page.tsx", "page.ts"],
async headers() {
return [
{
source: "/(.*)",
headers: securityHeaders,
},
];
},
};