【问题标题】:The requested captchaStyle 'yourFirstCaptchaStyle' is not defined in the botdetect.xmlbotdetect.xml 中未定义请求的验证码样式“yourFirstCaptchaStyle”
【发布时间】:2021-02-10 20:43:03
【问题描述】:

我使用带有角度前端和弹簧后端的 angular-captcha。

我完成了here 定义的所有步骤,但是当我打电话时

my-api-endpoint/simple-captcha-endpoint?get=html&c=yourFirstCaptchaStylews

它给了我以下错误

{ “时间戳”:“2021-02-08T00:37:14.011+0000”,“状态”:400,“错误”: "Bad Request", "message": "请求的验证码样式 'yourFirstCaptchaStyle' 未在 botdetect.xml 中定义!", "path": "//简单验证码端点" }

这是我的 botdetect.xml 文件内容:

<?xml version="1.0" encoding="UTF-8"?>
<botdetect xmlns="https://captcha.com/schema/java"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="https://captcha.com/schema/java
             https://captcha.com/schema/java/botdetect-4.0.beta3.7.xsd">

    <captchaStyles>
        <captchaStyle>
            <name>yourFirstCaptchaStyle</name>
            <userInputID>yourFirstCaptchaUserInput</userInputID>
        </captchaStyle>
    </captchaStyles>
</botdetect>

我不知道为什么我只是在 https 域上工作时收到此错误,而不是在 http://localhost

我错过了什么吗?提前致谢

【问题讨论】:

    标签: spring spring-mvc https captcha botdetect


    【解决方案1】:
    "BDC_configFileLocation", "/WEB-INF/classes/botdetect.xml");
    

    路径/WEB-INF/classes/botdetect.xml 为我工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-30
      • 1970-01-01
      • 2020-07-28
      • 2018-05-31
      • 2022-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多