...
|
...
|
@@ -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 = {};
|
...
|
...
|
|