Authored by 陈峰

commit

@@ -13,7 +13,7 @@ const net = require('net'); @@ -13,7 +13,7 @@ const net = require('net');
13 * @param {*} req 13 * @param {*} req
14 */ 14 */
15 const _getClientIp = req => { 15 const _getClientIp = req => {
16 - let remoteIp = req.get('X-Yoho-Real-IP') || req.get('X-Forwarded-For') || req.get('X-Real-IP') || req.ip; 16 + let remoteIp = req.get('X-Yoho-Real-IP') || req.get('X-Forwarded-For') || req.get('X-Real-IP') || req.ip || '';
17 17
18 if (remoteIp.indexOf(',') > 0) { 18 if (remoteIp.indexOf(',') > 0) {
19 let arr = remoteIp.split(','); 19 let arr = remoteIp.split(',');