-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathnext.config.js
56 lines (51 loc) · 1.29 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
/** @type {import('next').NextConfig} */
const redirectBase = process.env.NEXT_PUBLIC_BASE_PATH
? `${process.env.NEXT_PUBLIC_BASE_PATH}/`
: "";
const securityHeaders = [
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'Content-Security-Policy',
value: "frame-ancestors 'none';"
}
]
const nextConfig = {
reactStrictMode: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "",
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH || "",
images: {
loader: "custom",
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
nextImageExportOptimizer: {
imageFolderPath: "public/images",
exportFolderPath: "out",
quality: 75,
},
},
env: {
storePicturesInWEBP: true,
generateAndUseBlurImages: true,
distServer: "https://dist.ballerina.io",
gitHubPath:
"https://github.com/ballerina-platform/ballerina-dev-website/blob/master/",
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/:path*',
headers: securityHeaders,
},
]
},
trailingSlash: true,
resolve: [{ path: false, fs: false }],
experimental: {
scrollRestoration: true,
}
};
module.exports = nextConfig;