Authored by 郭成尧

validate-log

... ... @@ -406,7 +406,7 @@ exports.loginShowCaptchaByIp = function(req, res, next) {
co(function*() {
let hasErrorLog = yield cache.get(`loginErrorIp:${req.yoho.clientIp}`);
log.info(`clientip ${req.yoho.clientIp} status is ` + hasErrorLog);
log.info(`Pagerender clientip ${req.yoho.clientIp} status is ` + hasErrorLog);
if (hasErrorLog) {
req.yoho.captchaShow = true;
... ...
... ... @@ -9,6 +9,7 @@ const _ = require('lodash');
const config = global.yoho.config;
const co = Promise.coroutine;
const cache = global.yoho.cache;
const log = global.yoho.logger;
const geetest = require('./geetest');
const captcha = require('./captcha');
... ... @@ -33,6 +34,8 @@ const check = (req, res, next) => {
if (req.path === '/passport/login/auth') {
let hasErrorLog = yield cache.get(`loginErrorIp:${req.yoho.clientIp}`);
log.info(`Check clientip ${req.yoho.clientIp} status is ` + hasErrorLog);
if (hasErrorLog) {
req.yoho.captchaShow = true;
} else {
... ...