-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.mjs
127 lines (107 loc) · 3.16 KB
/
next.config.mjs
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import million from 'million/compiler';
import withPWA from '@ducanh2912/next-pwa';
import linguiConfig from './lingui.config.js';
/** @type {import('next').NextConfig} */
const nextConfig = withPWA({
reactStrictMode: false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true
},
images: {
domains: [
'nftstorage.link',
'ik.imagekit.io',
'asset.lenshareapp.xyz',
'ipfs.infura.io',
'ipfs.infura.io.ipfs.w3s.link',
'statics-polygon-lens-staging.s3.eu-west-1.amazonaws.com',
'nftstorage.link/ipfs/',
'lens.infura-ipfs.io.ipfs.4everland.io',
'source.unsplash.com',
'ar://',
'arweave.net',
'ipfs://',
'avatar.tobi.sh',
'statics-lens-staging.s3.eu-west-1.amazonaws.com',
'cdn.stamp.fyi',
'avatars.dicebear.com',
'assets.lenster.xyz',
'as1.ftcdn.net',
'avataaars.io',
'theshr.infura-ipfs.io',
'4everland.io',
'test.com',
'ui-avatars.com',
'opensea.io',
'rarible.com',
'lenshareapp.xyz',
'oembed.lenshareapp.xyz',
'lenshareapp.infura-ipfs.io',
'ik.imagekit.io/lens/media-snapshot',
'statics-polygon-lens.s3.eu-west-1.amazonaws.com/profile/',
'.ipfs.4everland.io',
'statics-polygon-lens.s3.eu-west-1.amazonaws.com',
'statics-polygon-lens.s3.us-west-2.amazonaws.com',
'statics-lens-staging.s3.us-west-2.amazonaws.com',
'gateway.ipfscdn.io',
'ipfs.4everland.io',
'gateway.ipfscdn.io/ipfs/',
'ep-noisy-rice-867852-pooler.us-west-2.postgres.vercel-storage.com',
'user-content.lenster.xyz',
'meta.lenshareapp.xyz',
'static-asset.lenster.xyz',
'static-asset.lenshareapp.xyz',
'static.lenstube.xyz',
'img.lenstube.xyz',
'ipfs.lenshareapp.xyz/ipfs',
'media.lenster.xyz',
'static-asset.lenshareapp.xyz',
'metadata.lenshareapp.xyz',
'metalens.lenshareapp.xyz'
]
},
i18n: {
locales: linguiConfig.locales,
defaultLocale: linguiConfig.sourceLocale
},
experimental: {
scrollRestoration: true
},
async rewrites() {
return [
{
source: '/sitemap.xml',
destination: 'https://sitemap.lenshareapp.xyz/sitemap.xml'
},
{
source: '/sitemaps/:match*',
destination: 'https://sitemap.lenshareapp.xyz/:match*'
}
];
},
async redirects() {
return [
{ source: '/u/:id(.+).lens', destination: '/u/:id', permanent: true },
{ source: '/u/:id(.+).test', destination: '/u/:id', permanent: true }
];
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{key:'Cross-Origin-Opener-Policy', value: 'same-origin-allow-popups'},
]
}
];
}
});
const millionConfig = {
auto: true,
}
export default million.next(nextConfig, millionConfig,linguiConfig);