Showing
1 changed file
with
1 additions
and
5 deletions
@@ -70,11 +70,7 @@ function doPassportCallback(req, res, user) { | @@ -70,11 +70,7 @@ function doPassportCallback(req, res, user) { | ||
70 | 70 | ||
71 | const common = { | 71 | const common = { |
72 | beforeLogin: (req, res, next) => { | 72 | beforeLogin: (req, res, next) => { |
73 | - let refer = req.query.refer; | ||
74 | - | ||
75 | - if (!refer) { | ||
76 | - refer = req.get('Referer'); | ||
77 | - } | 73 | + let refer = req.query.refer || req.get('Referer'); |
78 | 74 | ||
79 | refer && res.cookie('refer', encodeURI(refer), { | 75 | refer && res.cookie('refer', encodeURI(refer), { |
80 | domain: 'yohobuy.com' | 76 | domain: 'yohobuy.com' |
-
Please register or login to post a comment