aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2021-04-17 20:24:39 +0200
committerivarlovlie <git@ivarlovlie.no>2021-04-17 20:24:39 +0200
commit39ff1a0d5e22dbfedab9a4286c9cd13a2f25414a (patch)
tree5c6fbcfc59b8a3805ca4b6ae652410e272918363
parent0457b6f3579a00f08891825aee1629cbd1443d76 (diff)
downloadsrht-git-feed-39ff1a0d5e22dbfedab9a4286c9cd13a2f25414a.tar.xz
srht-git-feed-39ff1a0d5e22dbfedab9a4286c9cd13a2f25414a.zip
Add cache headers
-rw-r--r--index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.ts b/index.ts
index d8eba17..ed34551 100644
--- a/index.ts
+++ b/index.ts
@@ -86,7 +86,7 @@ for await (const req of serve({ port: parseInt(SERVER_PORT), hostname: SERVER_HO
} else if (req.url === "/") {
const headers = new Headers();
headers.append("Cache-Control", "public,no-transform,max-age=3600");
- headers.append("Expires", new Date().toUTCString());
+ headers.append("Expires", new Date(Date.now() + 3600).toUTCString());
req.respond({ body: JSON.stringify(await getRepositories()), headers: headers });
} else {
req.respond({