diff --git a/src/node/hooks/express/specialpages.js b/src/node/hooks/express/specialpages.js index c11e374e9..61471348d 100644 --- a/src/node/hooks/express/specialpages.js +++ b/src/node/hooks/express/specialpages.js @@ -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) { diff --git a/src/node/hooks/express/static.js b/src/node/hooks/express/static.js index 0b73072e5..d1dec8714 100644 --- a/src/node/hooks/express/static.js +++ b/src/node/hooks/express/static.js @@ -65,7 +65,8 @@ exports.expressCreateServer = async (hookName, args) => { clientPlugins[name] = {...plugins.plugins[name]}; delete clientPlugins[name].package; } - res.header('Content-Type', 'application/json; charset=utf-8'); + res.setHeader('Content-Type', 'application/json; charset=utf-8'); + res.setHeader('Cache-Control', `public, max-age=${settings.maxAge}`); res.write(JSON.stringify({plugins: clientPlugins, parts: clientParts})); res.end(); });