-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.js
More file actions
68 lines (67 loc) · 1.91 KB
/
next.config.js
File metadata and controls
68 lines (67 loc) · 1.91 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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: [
'i.ytimg.com',
'play.google.com',
'x.tago.works',
'youtube.com',
'youtube-nocookie.com',
'www.youtube-nocookie.com',
'firebase.google.com',
'img.youtube.com',
'lh3.googleusercontent.com',
'yt3.ggpht.com',
'i.ytimg.com',
'i1.ytimg.com',
'i2.ytimg.com',
'i3.ytimg.com',
'i4.ytimg.com',
'i5.ytimg.com',
'i6.ytimg.com',
'i7.ytimg.com',
'i8.ytimg.com',
'i9.ytimg.com',
],
},
async rewrites() {
return [
{
source: '/api/tago/:path*',
destination: 'https://x.tago.works/:path*',
},
];
},
async headers() {
return [
{
source: '/:path*',
headers: [
{
key: 'Content-Security-Policy',
value: `
default-src 'self' https: data: 'unsafe-inline' 'unsafe-eval';
script-src 'self' 'unsafe-eval' 'unsafe-inline' https: blob: https://*.google.com https://*.googleapis.com https://*.gstatic.com https://*.youtube.com https://*.youtube-nocookie.com https://*.ytimg.com;
style-src 'self' 'unsafe-inline' https:;
img-src 'self' data: https: blob:;
font-src 'self' data: https:;
frame-src 'self' https: blob: https://*.youtube.com https://*.youtube-nocookie.com;
object-src 'none';
base-uri 'self';
form-action 'self' https:;
connect-src 'self' https: wss: https://x.tago.works;
media-src 'self' https: blob:;
worker-src 'self' blob:;
`.replace(/\s{2,}/g, ' ').trim()
},
{
key: 'Cross-Origin-Embedder-Policy',
value: 'unsafe-none',
},
],
},
];
},
};
module.exports = nextConfig;