mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 07:33:08 +02:00
* 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 loaded = computed(() => !!window[variable.value]);
|
||||||
|
|
||||||
const src = computed(() => {
|
const src = computed(() => {
|
||||||
const endpoint = ({
|
switch (props.provider) {
|
||||||
hcaptcha: 'https://hcaptcha.com/1',
|
case 'hcaptcha': return 'https://js.hcaptcha.com/1/api.js?render=explicit&recaptchacompat=off';
|
||||||
recaptcha: 'https://www.recaptcha.net/recaptcha',
|
case 'recaptcha': return 'https://www.recaptcha.net/recaptcha/api.js?render=explicit';
|
||||||
} as Record<CaptchaProvider, string>)[props.provider];
|
}
|
||||||
|
|
||||||
return `${typeof endpoint === 'string' ? endpoint : 'about:invalid'}/api.js?render=explicit`;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const captcha = computed<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
|
const captcha = computed<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
|
||||||
|
|
Loading…
Reference in a new issue