-
Notifications
You must be signed in to change notification settings - Fork 26
/
next.config.js
41 lines (39 loc) · 1.11 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
const ContentSecurityPolicy = `
default-src 'self';
script-src 'self';
font-src 'self';
frame-ancestors 'self' https://app.safe.global;
`;
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
output: "standalone",
basePath: process.env.BASE_PATH || "",
async headers() {
return [
{
source: "/((?!api|_next/static|_next/image|favicon.ico).*)",
headers: [
{
key: "Content-Security-Policy",
value: `frame-ancestors 'self' https://app.safe.global;`,
},
],
},
{
source: "/manifest.json",
headers: [
{
key: "Content-Security-Policy",
value: ContentSecurityPolicy.replace(
/\s{2,}/g,
" ",
).trim(),
},
],
},
];
},
};
module.exports = nextConfig;