shivam413 commited on
Commit
1c25f54
·
verified ·
1 Parent(s): cf5bee4

Update next.config.js

Browse files
Files changed (1) hide show
  1. next.config.js +15 -17
next.config.js CHANGED
@@ -4,11 +4,18 @@
4
  * @type {import("next").NextConfig}
5
  **/
6
  const nextConfig = {
7
- output: 'standalone',
8
  images: {
9
- domains: [
10
- 'api.dicebear.com'
11
- ]
 
 
 
 
 
 
 
12
  },
13
  async headers() {
14
  return [
@@ -16,22 +23,13 @@ const nextConfig = {
16
  // apply headers to all routes
17
  source: "/:path*",
18
  headers: [
19
- {
20
- key: "X-DNS-Prefetch-Control",
21
- value: "on",
22
- },
23
- {
24
- key: "X-XSS-Protection",
25
- value: "1; mode=block",
26
- },
27
- {
28
- key: "X-Content-Type-Options",
29
- value: "nosniff",
30
- },
31
  ],
32
  },
33
  ]
34
  },
35
  }
36
 
37
- module.exports = nextConfig
 
4
  * @type {import("next").NextConfig}
5
  **/
6
  const nextConfig = {
7
+ output: "standalone",
8
  images: {
9
+ // Disable Next.js image optimization to avoid needing `sharp` in production
10
+ unoptimized: true,
11
+
12
+ // Replace deprecated `images.domains` with `remotePatterns`
13
+ remotePatterns: [
14
+ {
15
+ protocol: "https",
16
+ hostname: "api.dicebear.com",
17
+ },
18
+ ],
19
  },
20
  async headers() {
21
  return [
 
23
  // apply headers to all routes
24
  source: "/:path*",
25
  headers: [
26
+ { key: "X-DNS-Prefetch-Control", value: "on" },
27
+ { key: "X-XSS-Protection", value: "1; mode=block" },
28
+ { key: "X-Content-Type-Options", value: "nosniff" },
 
 
 
 
 
 
 
 
 
29
  ],
30
  },
31
  ]
32
  },
33
  }
34
 
35
+ module.exports = nextConfig