...
|
...
|
@@ -72,7 +72,7 @@ app.set('json replacer', function(key, value) { |
|
|
});
|
|
|
|
|
|
app.use((req, res, next) => {
|
|
|
req.isApmReport = _.get(req.app.locals, 'pc.open.bughd', false);
|
|
|
req.isApmReport = _.get(req.app.locals, 'wap.open.bughd', false); // 把错误上报的开关绑定到上下文,node-lib 库要使用
|
|
|
next();
|
|
|
});
|
|
|
|
...
|
...
|
@@ -115,8 +115,6 @@ app.use((req, res, next) => { |
|
|
req.yoho = {}; // req和res绑定yoho对象,用于传递全局数据, 如req.yoho.channel等
|
|
|
req.app.locals.wap = app.locals.wap; // zookeper对象赋值
|
|
|
|
|
|
req.isApmReport = app.locals.wap.open && app.locals.wap.open.bughd; // 把错误上报的开关绑定到上下文,node-lib 库要使用
|
|
|
|
|
|
// 独立的 UDID
|
|
|
if (!req.cookies.udid) {
|
|
|
res.cookie('udid', uuid.v4(), {
|
...
|
...
|
|