@@ -10,6 +10,73 @@ const config = {
1010 images : {
1111 domains : [ "storage.googleapis.com" ] ,
1212 } ,
13+ async headers ( ) {
14+ return [
15+ {
16+ source : "/api/upcoming-papers" ,
17+ headers : [
18+ {
19+ key : "Cache-Control" ,
20+ value : "public, s-maxage=60, stale-while-revalidate=120" ,
21+ } ,
22+ ] ,
23+ } ,
24+ {
25+ source : "/api/papers" ,
26+ headers : [
27+ {
28+ key : "Cache-Control" ,
29+ value : "public, s-maxage=60, stale-while-revalidate=120" ,
30+ } ,
31+ ] ,
32+ } ,
33+ {
34+ source : "/api/selected-papers" ,
35+ headers : [
36+ {
37+ key : "Cache-Control" ,
38+ value : "public, s-maxage=60, stale-while-revalidate=120" ,
39+ } ,
40+ ] ,
41+ } ,
42+ {
43+ source : "/api/related-subject" ,
44+ headers : [
45+ {
46+ key : "Cache-Control" ,
47+ value : "public, s-maxage=60, stale-while-revalidate=120" ,
48+ } ,
49+ ] ,
50+ } ,
51+ {
52+ source : "/api/course-list" ,
53+ headers : [
54+ {
55+ key : "Cache-Control" ,
56+ value : "public, s-maxage=60, stale-while-revalidate=120" ,
57+ } ,
58+ ] ,
59+ } ,
60+ {
61+ source : "/_next/static/:path*" ,
62+ headers : [
63+ {
64+ key : "Cache-Control" ,
65+ value : "public, max-age=31536000, immutable" ,
66+ } ,
67+ ] ,
68+ } ,
69+ {
70+ source : "/:path*\\.(css|js|png|jpg|jpeg|gif|webp|svg|ico|woff|woff2)" ,
71+ headers : [
72+ {
73+ key : "Cache-Control" ,
74+ value : "public, max-age=604800, stale-while-revalidate=86400" ,
75+ } ,
76+ ] ,
77+ } ,
78+ ] ;
79+ } ,
1380 webpack : ( config , options ) => {
1481 config . resolve . alias . canvas = false ;
1582 config . module . rules . push ( {
0 commit comments