* fix(#8133): hCaptcha の reCAPTCHA 互換挙動を無効化する * Update packages/client/src/components/captcha.vue * fix: hCaptcha host Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
8d502eba59
commit
9a4267f01f
1 changed files with 4 additions and 6 deletions
|
@ -55,12 +55,10 @@ const variable = computed(() => {
|
|||
const loaded = computed(() => !!window[variable.value]);
|
||||
|
||||
const src = computed(() => {
|
||||
const endpoint = ({
|
||||
hcaptcha: 'https://hcaptcha.com/1',
|
||||
recaptcha: 'https://www.recaptcha.net/recaptcha',
|
||||
} as Record<CaptchaProvider, string>)[props.provider];
|
||||
|
||||
return `${typeof endpoint === 'string' ? endpoint : 'about:invalid'}/api.js?render=explicit`;
|
||||
switch (props.provider) {
|
||||
case 'hcaptcha': return 'https://js.hcaptcha.com/1/api.js?render=explicit&recaptchacompat=off';
|
||||
case 'recaptcha': return 'https://www.recaptcha.net/recaptcha/api.js?render=explicit';
|
||||
}
|
||||
});
|
||||
|
||||
const captcha = computed<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
|
||||
|
|
Loading…
Reference in a new issue