-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
90 lines (83 loc) · 2.03 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
/** @type {import('next').NextConfig} */
const cspHeader = `
default-src 'self' https://api.hubspot.com
https://forms.hscollectedforms.net
https://app.hubspot.com;
script-src 'self' 'unsafe-eval' 'unsafe-inline'
https://js.hs-scripts.com
https://js.usemessages.com
https://js.hs-banner.com
https://js.hs-analytics.net
https://js.hscollectedforms.net
https://api.hubspot.com
https://udbaa.com;
style-src 'self' 'unsafe-inline';
img-src * 'self' blob: data: filesystem: https://*.foodieful.net;
plugin-types application/pdf;
font-src 'self' data:;
object-src 'none';
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests;
`
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value: cspHeader.replace(/\n/g, ''),
},
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'origin-when-cross-origin',
},
{
key: 'Permissions-Policy',
value: "browsing-topics=(), camera=(), geolocation=(), microphone=()",
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000; includeSubDomains; preload'
}
]
},
]
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 's.yimg.com',
port: '',
pathname: '**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
port: '',
pathname: '**',
},
{
protocol: 'https',
hostname: 'drive.google.com',
port: '',
pathname: '**',
}
],
},
};
export default nextConfig;