mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-08-27 19:44:06 -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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user