From 2f9fc2028561dda0b98755359289308c8f1d5484 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 2 Jun 2018 17:24:54 +0800 Subject: [PATCH] app: cut Cache-Control header in half --- middleware/header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/header.js b/middleware/header.js index d06f5ceeb..87a9b5cb2 100644 --- a/middleware/header.js +++ b/middleware/header.js @@ -9,7 +9,7 @@ module.exports = async (ctx, next) => { 'Access-Control-Allow-Headers': 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild', 'Access-Control-Allow-Methods': 'PUT, POST, GET, DELETE, OPTIONS', 'Content-Type': 'application/xml; charset=utf-8', - 'Cache-Control': `max-age=${config.cacheExpire}`, + 'Cache-Control': `max-age=${config.cacheExpire / 2}`, }; ctx.set(headers); await next();