Authored by htoooth

fix

... ... @@ -61,6 +61,11 @@ app.enable('trust proxy');
app.set('subdomain offset', 2);
app.use((req, res, next) => {
req.isApmReport = _.get(req.app.locals, 'pc.open.bughd', false);
next();
});
// 添加请求上下文
app.use(global.yoho.httpCtx());
... ... @@ -86,7 +91,6 @@ require('./doraemon/middleware/yoho-session')(app);
app.use((req, res, next) => {
req.user = {}; // 全局的用户数据
req.yoho = {}; // req和res绑定yoho对象,用于传递全局数据, 如req.yoho.channel等
req.isApmReport = _.get(req.app.locals, 'pc.open.bughd', false);
if (!req.session) {
req.session = {};
... ...
... ... @@ -57,7 +57,7 @@
"urlencode": "^1.1.0",
"uuid": "^2.0.2",
"yoho-express-session": "^2.0.0",
"yoho-node-lib": "=0.5.29",
"yoho-node-lib": "=0.5.30",
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
... ...