-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
35 lines (30 loc) · 1.08 KB
/
next.config.ts
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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
reactStrictMode: false,
compress: true,
poweredByHeader: false,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value: `
default-src 'self';
script-src 'self' ${process.env.NODE_ENV === "development" ? "'unsafe-eval' 'unsafe-inline'" : ""} https://static.cloudflareinsights.com/beacon.min.js;
style-src 'self' 'unsafe-inline' https://api.fontshare.com/;
img-src 'self' https://saint-chroma.cdn.13373333.one/ https://i.ytimg.com/vi/ https://cdn.simpleicons.org/;
media-src 'self' https://saint-chroma.cdn.13373333.one/;
font-src 'self' https://cdn.fontshare.com/;
frame-src https://www.youtube-nocookie.com;
connect-src 'self' https://cloudflareinsights.com/;
upgrade-insecure-requests;
`.replace(/\r|\n/g, '')
},
],
},
]
}
};
export default nextConfig;