mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-07-10 14:26:58 -05:00
fix(npdl): Add Last-Modified header on response
This allows Express to return `304 Not Modified` when the console already has cached the requested BOSS file.
This commit is contained in:
parent
c7fc1bbcdc
commit
5d2f11858e
|
|
@ -36,6 +36,7 @@ npdl.get([
|
|||
return;
|
||||
}
|
||||
|
||||
response.setHeader('Last-Modified', new Date(Number(file.updated)).toUTCString());
|
||||
readStream.pipe(response);
|
||||
});
|
||||
|
||||
|
|
@ -43,4 +44,4 @@ const router = express.Router();
|
|||
|
||||
router.use(subdomain('npdl.cdn', npdl));
|
||||
|
||||
export default router;
|
||||
export default router;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user