Authored by 姜枫

fix when one route mulit path

@@ -21,6 +21,11 @@ module.exports = () => { @@ -21,6 +21,11 @@ module.exports = () => {
21 function onRender() { 21 function onRender() {
22 let route = req.route ? req.route.path : ''; 22 let route = req.route ? req.route.path : '';
23 let appPath = req.app.mountpath; 23 let appPath = req.app.mountpath;
  24 +
  25 + if (_.isArray(route) && route.length > 0) {
  26 + route = route[0];
  27 + }
  28 +
24 let key = urlJoin(appPath, route.toString()); // route may be a regexp 29 let key = urlJoin(appPath, route.toString()); // route may be a regexp
25 30
26 req.app.set('etag', false); 31 req.app.set('etag', false);