big update

This commit is contained in:
KingKDot
2026-05-21 09:51:12 -05:00
parent 24a023f400
commit b693cbbbf5
23 changed files with 2011 additions and 251 deletions
@@ -306,17 +306,12 @@ export async function handleClientRoutes(
if (!record) {
return new Response("Not Found", { status: 404 });
}
const etag = `"${clientId}-${record.version}"`;
if (req.headers.get("if-none-match") === etag) {
return new Response(null, { status: 304, headers: { ETag: etag } });
}
return new Response(record.bytes as unknown as BodyInit, {
status: 200,
headers: {
"Content-Type": record.contentType,
"Content-Length": String(record.bytes.byteLength),
ETag: etag,
"Cache-Control": "private, max-age=300",
"Cache-Control": "no-store",
},
});
}