-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.mjs
46 lines (45 loc) · 1.18 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
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'd1uo68v5hl2ge5.cloudfront.net' ,
},
{
protocol: 'https',
hostname: "firebasestorage.googleapis.com" ,
},
{
protocol: 'https',
hostname: "dainikdhaka24.com" ,
},
{
protocol: 'https',
hostname: "placehold.co" ,
},
],
},
async headers() {
return [
// Cache only /api/public/*
{
source: "/api/public/:path*",
headers: process.env.NODE_ENV === "development"
? [
{
key: "Cache-Control",
value: "no-store", // Disable caching in development
},
]
: [
{
key: "Cache-Control",
value: "s-maxage=3600, stale-while-revalidate=59", // Cache for production
},
],
},
];
},
};
export default nextConfig;