Authored by htoooth

fix

... ... @@ -16,6 +16,8 @@ const index = (req, res, next) => {
const check = captchaService.geetestCheck;
const img = captchaService.geetestGenerate;
const isHuman = (req, res) => {
let remoteIp = req.get('X-Forwarded-For') || req.ip;
... ... @@ -39,5 +41,6 @@ const isHuman = (req, res) => {
module.exports = {
index,
check,
isHuman
isHuman,
img
};
... ...
... ... @@ -21,7 +21,7 @@ const questionnaire = require(`${cRoot}/questionnaire`);
router.get('/ads', ads.jump);
router.get('/check', captcha.geetestOnly, robot.index);
router.post('/check', robot.check, robot.isHuman);
router.post('/captcha.png', captcha.geetestGenerate);
router.post('/captcha.png', robot.img);
router.get('/material', auth, materialController.indexNew);
router.get('/material/old', auth, materialController.index);
... ...
... ... @@ -3,7 +3,7 @@ var $ = require('yoho-jquery'),
var captcha = new Captcha('.captcha-wrap', {
checkURI: '/3party/check',
initURL: '/3party/captcha.png',
initURI: '/3party/captcha.png',
page: 'robot'
}).init();
... ...