forked from lightrainstech/next-12-tailwind-3-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
64 lines (62 loc) · 1.37 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const securityHeaders = [
{
key: 'X-DNS-Prefetch-Control',
value: 'on'
},
{
key: 'X-XSS-Protection',
value: '1; mode=block'
},
{
key: 'Referrer-Policy',
value: 'same-origin'
},
// {
// key: 'X-Content-Type-Options',
// value: 'nosniff'
// },
{
key: 'Permissions-Policy',
value: 'geolocation=(self), interest-cohort=()'
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload'
},
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable'
}
]
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
module.exports = withBundleAnalyzer({
reactStrictMode: true,
images: {
domains: [
'unsplash.it',
'gateway.pinata.cloud',
'ipfs.io',
'ipfs.ninsta.io'
],
formats: ['image/avif', 'image/webp']
},
publicRuntimeConfig: {
backendUrl: 'https://api.ninsta.io/api',
infura: '9969f5fd1bc248289bb7cc90bb20e163',
walletconnect: 'aacd16027c242c0034350228947f584c',
nftContract: '0x5452a1b19594Eb1593a4d18b27D50b380b83A973',
chainExplorer: 'https://polygonscan.com/',
opesnSea: 'https://opensea.io/assets/matic/'
},
poweredByHeader: false,
async headers() {
return [
{
source: '/(.*)',
headers: securityHeaders
}
]
}
})