From 9a4267f01fb0a8b56a3176778e28115f9d8765cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Fri, 21 Jan 2022 17:43:14 +0900 Subject: [PATCH] =?UTF-8?q?fix(#8133):=20hCaptcha=20=E3=81=AE=20reCAPTCHA?= =?UTF-8?q?=20=E4=BA=92=E6=8F=9B=E6=8C=99=E5=8B=95=E3=82=92=E7=84=A1?= =?UTF-8?q?=E5=8A=B9=E5=8C=96=E3=81=99=E3=82=8B=20(#8135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(#8133): hCaptcha の reCAPTCHA 互換挙動を無効化する * Update packages/client/src/components/captcha.vue * fix: hCaptcha host Co-authored-by: tamaina --- packages/client/src/components/captcha.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/captcha.vue b/packages/client/src/components/captcha.vue index 7fe499dc8..770804cf4 100644 --- a/packages/client/src/components/captcha.vue +++ b/packages/client/src/components/captcha.vue @@ -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)[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(() => window[variable.value] || {} as unknown as Captcha);