|
@@ -25,6 +25,7 @@ module.exports = () => { |
|
@@ -25,6 +25,7 @@ module.exports = () => { |
25
|
// 不要使用 === 判断uid的值,如果需要判断使用 ==
|
25
|
// 不要使用 === 判断uid的值,如果需要判断使用 ==
|
26
|
let sessionKey = req.cookies._SESSION_KEY && crypto.decrypt('yoho9646abcdefgh', req.cookies._SESSION_KEY);
|
26
|
let sessionKey = req.cookies._SESSION_KEY && crypto.decrypt('yoho9646abcdefgh', req.cookies._SESSION_KEY);
|
27
|
|
27
|
|
|
|
28
|
+ sessionKey = sessionKey.replace(/\W/g, '');
|
28
|
req.user.uid = {
|
29
|
req.user.uid = {
|
29
|
toString: () => {
|
30
|
toString: () => {
|
30
|
return cookie.getUid(req);
|
31
|
return cookie.getUid(req);
|