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