Authored by htoooth

fix

@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 8
9 const requestIp = require('request-ip'); 9 const requestIp = require('request-ip');
10 const md5 = require('md5'); 10 const md5 = require('md5');
  11 +const config = global.yoho.config;
11 12
12 const _getGender = (channel) => { 13 const _getGender = (channel) => {
13 switch (channel) { 14 switch (channel) {
@@ -68,7 +69,9 @@ module.exports = () => { @@ -68,7 +69,9 @@ module.exports = () => {
68 udid = md5(req.ip || requestIp.getClientIp(req)); 69 udid = md5(req.ip || requestIp.getClientIp(req));
69 70
70 if (res && res.cookie) { 71 if (res && res.cookie) {
71 - res.cookie('udid', udid); 72 + res.cookie('udid', udid, {
  73 + domain: config.cookieDomain
  74 + });
72 } 75 }
73 } 76 }
74 77