feat(core): set cache-control max-age equal to config.cacheExpire

This commit is contained in:
DIYgod
2019-04-29 11:15:00 +08:00
parent cac1a9e7ce
commit 847bb00a9e
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ const headers = {
'Access-Control-Allow-Headers': 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With',
'Access-Control-Allow-Methods': 'GET',
'Content-Type': 'application/xml; charset=utf-8',
'Cache-Control': `max-age=${config.cacheExpire / 2}`,
'Cache-Control': `max-age=${config.cacheExpire}`,
};
module.exports = async (ctx, next) => {