mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Add caching to static files
This commit is contained in:
parent
3fa4f59ebe
commit
6c4670daa7
@ -171,7 +171,10 @@ export class PublicRouter {
|
||||
if (!fs.existsSync(file)) {
|
||||
return res.sendStatus(404);
|
||||
}
|
||||
res.sendFile(file);
|
||||
res.sendFile(file, {
|
||||
maxAge: 31536000,
|
||||
dotfiles: 'allow',
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user