cms icon indicating copy to clipboard operation
cms copied to clipboard

升级到最新版后,api的验证码验证提示错误

Open drsonic192 opened this issue 8 years ago • 4 comments

captcha的接口,以前用是没有问题,升级后提示400错误,但是我的代码都没有变,想问一下是什么问题?谢谢

drsonic192 avatar Nov 12 '18 10:11 drsonic192

看看API地址对不对,应该是: /api/v1/captcha/{name}

starlying avatar Nov 13 '18 04:11 starlying

看看API地址对不对,应该是: /api/v1/captcha/{name}

是验证的接口:/api/v1/captcha/{name}/actions/check 这个,好像不能跨域,在同一域名下可以有返回,在localhost下调用就不行,只有这个接口不行其它都可以

drsonic192 avatar Nov 13 '18 07:11 drsonic192

接口是能跨域的,应该是调用接口的代码没有设置跨域,如果是js调用一般设置withCredentials属性

starlying avatar Nov 13 '18 08:11 starlying

接口是能跨域的,应该是调用接口的代码没有设置跨域,如果是js调用一般设置withCredentials属性

已经解决了,感谢!

drsonic192 avatar Nov 13 '18 16:11 drsonic192