Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit d56388c

Browse files
authored
fix(caching): updated correct headers for caching (#2722)
1 parent 1fda787 commit d56388c

1 file changed

Lines changed: 52 additions & 11 deletions

File tree

firebase.json

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,55 @@
66
"firebase.json",
77
"**/.*",
88
"**/node_modules/**"
9+
],
10+
"headers": [
11+
{
12+
"source": "**/*",
13+
"headers": [
14+
{
15+
"key": "cache-control",
16+
"value": "public, max-age=0, must-revalidate"
17+
}
18+
]
19+
},
20+
{
21+
"source": "static/**",
22+
"headers": [
23+
{
24+
"key": "cache-control",
25+
"value": "public, max-age=31536000, immutable"
26+
}
27+
]
28+
},
29+
{
30+
"source": "**/*.@(css|js)",
31+
"headers": [
32+
{
33+
"key": "cache-control",
34+
"value": "public, max-age=31536000, immutable"
35+
}
36+
]
37+
},
38+
{
39+
"source": "sw.js",
40+
"headers": [
41+
{
42+
"key": "cache-control",
43+
"value": "public, max-age=0, must-revalidate"
44+
}
45+
]
46+
},
47+
{
48+
"source": "page-data/**",
49+
"headers": [
50+
{
51+
"key": "cache-control",
52+
"value": "public, max-age=0, must-revalidate"
53+
}
54+
]
55+
}
956
]
1057
},
11-
"headers": [
12-
{
13-
"source": "**/sw.js",
14-
"headers": [
15-
{
16-
"key": "Cache-Control",
17-
"value": "public, max-age=0, must-revalidate"
18-
}
19-
]
20-
}
21-
],
2258
"redirects": [
2359
{
2460
"source": "/get-involved/",
@@ -59,6 +95,11 @@
5995
"source": "/about/trademark/",
6096
"destination": "https://trademark-policy.openjsf.org/",
6197
"type": "301"
98+
},
99+
{
100+
"source": "/docs/*",
101+
"destination": "/api/",
102+
"type": "301"
62103
}
63104
]
64105
}

0 commit comments

Comments
 (0)