-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
95 lines (89 loc) · 2.47 KB
/
Copy pathnext.config.ts
File metadata and controls
95 lines (89 loc) · 2.47 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
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
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
allowedDevOrigins: ['127.0.0.1', 'localhost'],
async headers() {
const securityHeaders = [
{
key: 'Content-Security-Policy',
value: [
'default-src \'self\'',
'script-src \'self\' \'unsafe-inline\' \'unsafe-eval\'',
'style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com',
'img-src \'self\' data: blob: https://cdn.100xadi.com https://cdn.perpetuity.dev https://hoirqrkdgbmvpwutwuwj.supabase.co https://images.unsplash.com https://ik.imagekit.io',
'media-src \'self\' data: blob: https://ik.imagekit.io',
'font-src \'self\' data: https://fonts.gstatic.com',
'connect-src \'self\' https://api-preprod.phonepe.com https://api.phonepe.com https://apiv2.shiprocket.in https://*.r2.cloudflarestorage.com https://cdn.100xadi.com https://cdn.perpetuity.dev',
'frame-ancestors \'none\'',
'base-uri \'self\'',
'form-action \'self\'',
].join('; '),
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=()',
},
];
if (process.env.NODE_ENV === 'production') {
securityHeaders.push({
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload',
});
}
return [
{
source: '/:path*',
headers: securityHeaders,
},
];
},
// lets adds some temp image domain
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'hoirqrkdgbmvpwutwuwj.supabase.co',
port: '',
// pathname: '',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
{
protocol: 'https',
hostname: 'example.com',
},
{
protocol: 'https',
hostname: 'cdn.100xadi.com',
},
{
protocol: 'https',
hostname: 'cdn.perpetuity.dev',
},
{
protocol: 'https',
hostname: 'ik.imagekit.io',
},
],
},
/* config options here */
reactCompiler: true,
devIndicators: false,
turbopack: {
root: process.cwd(),
},
};
export default nextConfig;