performance: maxAge for favicon and plugin definitions (#4761)

This commit is contained in:
John McLear 2021-02-13 08:13:48 +00:00 committed by GitHub
parent 09e9c36098
commit 483f4344c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -83,7 +83,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
settings.skinName,
'favicon.ico'
);
res.setHeader('Cache-Control', `public, max-age=${settings.maxAge}`);
res.sendFile(filePath, (err) => {
// there is no custom favicon, send the default favicon
if (err) {