Merge branch 'hotfix/register' into hotfix/security-2
Showing
1 changed file
with
2 additions
and
0 deletions
@@ -84,6 +84,7 @@ class Auth { | @@ -84,6 +84,7 @@ class Auth { | ||
84 | `${data.profile_name}::${encryptionUid}::${data.vip_info && data.vip_info.title}::${saltedToken}`; | 84 | `${data.profile_name}::${encryptionUid}::${data.vip_info && data.vip_info.title}::${saltedToken}`; |
85 | 85 | ||
86 | res.cookie('_UID', uidCookie, { | 86 | res.cookie('_UID', uidCookie, { |
87 | + httpOnly: true, | ||
87 | domain: 'yohobuy.com', | 88 | domain: 'yohobuy.com', |
88 | expires: new Date(Date.now() + 2592000000) // 有效期一年 | 89 | expires: new Date(Date.now() + 2592000000) // 有效期一年 |
89 | }); | 90 | }); |
@@ -92,6 +93,7 @@ class Auth { | @@ -92,6 +93,7 @@ class Auth { | ||
92 | req.session.TOKEN = publicToken; | 93 | req.session.TOKEN = publicToken; |
93 | req.session.LOGIN_UID = uid; | 94 | req.session.LOGIN_UID = uid; |
94 | res.cookie('_TOKEN', publicToken, { | 95 | res.cookie('_TOKEN', publicToken, { |
96 | + httpOnly: true, | ||
95 | domain: 'yohobuy.com', | 97 | domain: 'yohobuy.com', |
96 | expires: new Date(Date.now() + 2592000000) // 有效期一年 | 98 | expires: new Date(Date.now() + 2592000000) // 有效期一年 |
97 | }); | 99 | }); |
-
Please register or login to post a comment