Add some cache-controlling headers on returned encrypted objects.

This commit is contained in:
Marsell Kukuljevic 2026-01-16 10:48:43 +00:00
parent 0ce52bf299
commit 8df9cc54cb

View File

@ -52,7 +52,11 @@ const server = http.createServer((req, res) => {
}
const readStream = fs.createReadStream(filePath);
res.writeHead(200, { 'Content-Type': 'application/octet-stream' });
res.writeHead(200, {
'Content-Type': 'application/octet-stream',
'Cache-Control': 'no-store, no-cache, must-revalidate',
'Expires': 0
});
readStream.pipe(res);
// Delete immediately after stream ends