Skip to content

Commit

Permalink
Add some revalidation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Sep 28, 2024
1 parent c1384f3 commit 2007791
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/http.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export async function launch(trie, libp2p) {

reply.header(
"Cache-Control",
"public, max-age=10, no-transform, stale-while-revalidate=31536000",
"public, max-age=10, no-transform, must-revalidate, stale-while-revalidate=31536000",
);
const code = 200;
const httpMessage = "OK";
Expand Down Expand Up @@ -596,7 +596,7 @@ export async function launch(trie, libp2p) {
);
reply.header(
"Cache-Control",
"public, max-age=10, no-transform, stale-while-revalidate=31536000",
"public, max-age=10, no-transform, must-revalidate, stale-while-revalidate=31536000",
);
return reply.status(200).type("text/html").send(content);
});
Expand Down Expand Up @@ -628,7 +628,7 @@ export async function launch(trie, libp2p) {
if (request.query.cached) {
reply.header(
"Cache-Control",
"public, max-age=1, no-transform, stale-while-revalidate=5",
"public, max-age=1, no-transform, must-revalidate, stale-while-revalidate=5",
);
} else {
reply.header("Cache-Control", "no-cache");
Expand Down

0 comments on commit 2007791

Please sign in to comment.