...
|
...
|
@@ -66,8 +66,13 @@ app.use(session({ |
|
|
secret: config.sessionSecret
|
|
|
}));
|
|
|
|
|
|
// app 访问校验参数是否合法
|
|
|
// 前置中间件
|
|
|
app.use(function(req, res, next) {
|
|
|
if (!req.session) {
|
|
|
console.error('redis-session 配置有误');
|
|
|
}
|
|
|
|
|
|
// app 访问校验参数是否合法
|
|
|
if (req.query.app_version || (req.query.openrefer === 'app' && req.query.uid)) {
|
|
|
if (sign.checkSign(req.query) || sign.webSign(req.query)) {
|
|
|
req.isApp = true;
|
...
|
...
|
|