-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
40 lines (36 loc) · 1.1 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
// ./next.config.mjs
//
// Root configurations for the NextJS app.
// -----------------------------------------------------------------------------
// Local route constant re-definitions (since cannot import from src/).
// IMPORTANT: Double check with "src/constants/routeConstants.ts".
const RESEARCH_POSTINGS_ROUTE = "/postings";
// -----------------------------------------------------------------------------
/** @type {import('next').NextConfig} */
const nextConfig = {
async headers() {
return [
// Cache-Control for /research/postings endpoint.
// Force browser to revalidate cache with server every time to avoid stale data.
{
source: RESEARCH_POSTINGS_ROUTE,
headers: [
{
key: "Cache-Control",
value: "public, max-age=0, must-revalidate",
},
// Pragma and Expires headers for older HTTP/1.0 clients.
{
key: "Pragma",
value: "no-cache",
},
{
key: "Expires",
value: "0",
},
],
},
];
},
};
export default nextConfig;