fix: properly check hcaptcha public site key

This commit is contained in:
mrjvs
2026-08-16 18:34:56 +02:00
parent cbe5053b84
commit 78b0f3a444

View File

@@ -3,7 +3,7 @@ import type { H3Event } from 'h3';
export async function hcaptchaVerify(event: H3Event, captchaResponse: string | null | undefined): Promise<boolean> {
const config = useRuntimeConfig(event);
if (!config.hcaptchaSiteKey) {
if (!config.public.hcaptchaSiteKey) {
return true;
} // No captcha is configured, always valid
if (!config.hcaptchaSecretKey) {