Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
陈峰
2017-03-22 10:44:12 +0800
Commit
974d49977e277658ac9e494597528362ccde1a09
2 parents
bd729db9
c94b0124
Merge branch 'feature/session' into 'release/5.5.1'
Feature/session See merge request
!408
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
doraemon/middleware/user.js
doraemon/middleware/user.js
View file @
974d499
...
...
@@ -25,7 +25,7 @@ module.exports = () => {
// 不要使用 === 判断uid的值,如果需要判断使用 ==
let
sessionKey
=
req
.
cookies
.
_SESSION_KEY
&&
crypto
.
decrypt
(
'yoho9646abcdefgh'
,
req
.
cookies
.
_SESSION_KEY
);
sessionKey
=
sessionKey
.
replace
(
/
\W
/g
,
''
);
sessionKey
=
sessionKey
.
replace
(
/
[^\w
:-
]
/g
,
''
);
req
.
user
.
uid
=
{
toString
:
()
=>
{
return
cookie
.
getUid
(
req
);
...
...
Please
register
or
login
to post a comment