Authored by 陈峰

commit

... ... @@ -5,6 +5,11 @@ const checkParams = require('../../utils/check-params');
const apiMaps = require('../../config/api-map');
module.exports = async(req, res, next) => {
res.set({
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString()
});
const apiInfo = apiMaps[req.path];
if (!apiInfo) {
... ...
... ... @@ -73,6 +73,11 @@ const getCacheKey = (urlPath, cackeKey = '') => {
const render = (route) => {
return async(req, res, next) => {
try {
res.set({
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString()
});
res.setHeader('X-YOHO-Version', pkg.version);
const isDegrade = _.get(req.app.locals.wap, 'webapp.degrade', false);
... ...