-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
51 lines (43 loc) · 1.18 KB
/
next.config.ts
File metadata and controls
51 lines (43 loc) · 1.18 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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
//------------------------------------------------------------
// Allowed images quality
// images: {
// qualities: [25, 50, 75, 100],
// },
// Headers allow you to set custom HTTP headers on the response to an incoming request on a given path.
/*
//------------------------------------------------------------
async headers() {
return [
{
source:
"/:all*.(webp|avif|jpg|jpeg|png|gif|svg|ico|woff2|woff|ttf|otf|eot|pdf|mp4|webm)",
headers: [
{
key: "Cache-Control",
value: "public, max-age=604800, must-revalidate", // 7 days
},
],
},
];
},
Use remotePatterns to allow images from specific external paths and block all others. This ensures that only external images from your account can be served.
images: {
remotePatterns: [
{
protocol: "https",
hostname: "lh3.googleusercontent.com",
port: "",
},
{
protocol: "https",
hostname: "*.utfs.io",
port: "",
},
],
},
*/
};
export default nextConfig;