summaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-22 21:25:30 -0800
committerFuwn <[email protected]>2024-01-22 21:25:30 -0800
commit5747eb75e65af1bb8d02de20da624e2a2b623182 (patch)
tree2bd253a1087ab939b0c74bf55a78a595f3a3bfc5 /index.ts
parentfeat: initial release (diff)
downloadcdn.due.moe-5747eb75e65af1bb8d02de20da624e2a2b623182.tar.xz
cdn.due.moe-5747eb75e65af1bb8d02de20da624e2a2b623182.zip
feat(index.ts): Cache-Control
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.ts b/index.ts
index ae11e69..545f8e3 100644
--- a/index.ts
+++ b/index.ts
@@ -98,6 +98,11 @@ const handleRequest = async (originalRequest) => {
// );
// }
+ response.headers.set(
+ "cache-control",
+ "public, immutable, s-maxage=31536000, max-age=31536000, stale-while-revalidate=60"
+ );
+
return new Response(response.body, {
status: response.status,
statusText: response.statusText,