-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.mjs
More file actions
71 lines (70 loc) · 2.11 KB
/
Copy pathnext.config.mjs
File metadata and controls
71 lines (70 loc) · 2.11 KB
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
62
63
64
65
66
67
68
69
70
71
/** @type {import('next').NextConfig} */
const nextConfig = {
async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "Content-Security-Policy",
value: [
"default-src 'self'",
"img-src 'self' data: https: http://45.205.31.33:8080",
"script-src 'self' 'unsafe-eval' 'unsafe-inline'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
"font-src 'self' https://fonts.gstatic.com",
"connect-src 'self' https://api.github.com https://avatars.githubusercontent.com https://api.mcsrvstat.us https://uapis.cn https://raw.githubusercontent.com https://gh-proxy.org https://cdn.gh-proxy.org https://edgeone.gh-proxy.org https://hk.gh-proxy.org https://gh.xmly.dev https://fastly.jsdelivr.net https://gcore.jsdelivr.net http://45.205.31.33:8080 http://45.205.31.33:6000 https://q.qlogo.cn/",
"object-src 'none'",
"frame-src 'self' https://player.bilibili.com",
"base-uri 'self'",
"form-action 'self'",
].join("; "),
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "no-referrer",
},
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
],
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "*.vercel.app",
},
// 允许你的自定义CDN图片
{
protocol: "http",
hostname: "45.205.31.33",
port: "8080",
pathname: "/**",
},
{
protocol: "http",
hostname: "82.152.64.152",
port: "8080",
pathname: "/**",
},
],
},
reactStrictMode: true,
};
export default nextConfig;