forked from heyxyz/hey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
67 lines (65 loc) · 1.86 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
65
66
67
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
});
const headers = [{ key: 'Cache-Control', value: 'public, max-age=3600' }];
module.exports = withBundleAnalyzer(
withSentryConfig(
{
sentry: {
hideSourceMaps: true
},
reactStrictMode: false,
trailingSlash: false,
experimental: {
scrollRestoration: true,
newNextLinkBehavior: true
},
async rewrites() {
return [
{
source: '/sitemap.xml',
destination: 'https://sitemap.lenster.xyz/sitemap.xml'
},
{
source: '/sitemaps/:match*',
destination: 'https://sitemap.lenster.xyz/sitemaps/:match*'
}
];
},
async redirects() {
return [
{
source: '/discord',
destination: 'https://discord.com/invite/B8eKhSSUwX',
permanent: true
},
{
source: '/donate',
destination: 'https://gitcoin.co/grants/5007/lenster',
permanent: true
}
];
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'Referrer-Policy', value: 'strict-origin' },
{ key: 'Permissions-Policy', value: 'interest-cohort=()' }
]
},
{ source: '/about', headers },
{ source: '/privacy', headers },
{ source: '/thanks', headers }
];
}
},
{ silent: true } // Sentry config
)
);