Authored by 郭成尧

'cookie-crypt-self'

... ... @@ -3,10 +3,14 @@
*/
'use strict';
const helpers = global.yoho.helpers;
const crypto = global.yoho.crypto;
exports.index = (req, res) => {
res.cookie('_QYH_UNION', decodeURI(req.query._QYH_UNION), {
let quhUnion = crypto.encryption('', decodeURI(req.query._QYH_UNION));
res.cookie('_QYH_UNION', quhUnion, {
domain: 'yohobuy.com'
});
return res.redirect(req.query.target || helpers.urlFormat('/'));
};
... ...