-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
50 lines (48 loc) · 1.27 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
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "giorgio-paoloni-gallery-storage.s3.eu-north-1.amazonaws.com",
pathname: "**", // Matches any path within the bucket
},
{
protocol: "https",
hostname: "images.pexels.com",
},
{
protocol: "https",
hostname: "d321io5nxf2wuu.cloudfront.net",
},
],
},
// Aggiunta dei security headers
async headers() {
return [
{
// Applica i security headers a tutte le route
source: "/(.*)",
headers: [
{
key: "X-Frame-Options",
value: "DENY", // Impedisce che la tua app venga caricata in un iframe
},
{
key: "X-Content-Type-Options",
value: "nosniff", // Previene l'interpretazione dei file come diversi dai loro mime types dichiarati
},
{
key: "Referrer-Policy",
value: "no-referrer",
},
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()", // Limita le API dei permessi disponibili
},
],
},
];
},
};
export default nextConfig;