Showing
1 changed file
with
4 additions
and
0 deletions
@@ -75,6 +75,10 @@ const render = (route) => { | @@ -75,6 +75,10 @@ const render = (route) => { | ||
75 | try { | 75 | try { |
76 | res.setHeader('X-YOHO-Version', pkg.version); | 76 | res.setHeader('X-YOHO-Version', pkg.version); |
77 | const isDegrade = _.get(req.app.locals.wap, 'webapp.degrade', false); | 77 | const isDegrade = _.get(req.app.locals.wap, 'webapp.degrade', false); |
78 | + | ||
79 | + if (isDegrade) { | ||
80 | + return res.send(degradeHtml); | ||
81 | + } | ||
78 | const ck = route.cackeKey ? getCacheKey(req.url, route.cackeKey) : void 0; | 82 | const ck = route.cackeKey ? getCacheKey(req.url, route.cackeKey) : void 0; |
79 | 83 | ||
80 | if (config.useCache && route.cache && ck) { | 84 | if (config.useCache && route.cache && ck) { |
-
Please register or login to post a comment