mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09: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
@ -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 New Issue
Block a user