mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
feat(frontend): ⚡ Add Cache-Control header to frontends served
This commit is contained in:
parent
9834825184
commit
5dd6ea4d10
|
|
@ -94,6 +94,7 @@ const handleManifestRequest = async () => {
|
|||
headers: {
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
"Content-Length": String(JSON.stringify(manifest).length),
|
||||
"Cache-Control": "max-age=31536000",
|
||||
Date: new Date().toUTCString(),
|
||||
},
|
||||
});
|
||||
|
|
@ -171,6 +172,7 @@ const returnFile = async (file: BunFile, content?: string) => {
|
|||
headers: {
|
||||
"Content-Type": `${file.type}; charset=utf-8`,
|
||||
"Content-Length": String(file.size),
|
||||
"Cache-Control": "max-age=31536000",
|
||||
Date: new Date().toUTCString(),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue