From 61fd6f1741eb9250062ba650338bb2c6d8d5bd31 Mon Sep 17 00:00:00 2001 From: Sasha Sorokin <10401817+brawaru@users.noreply.github.com> Date: Sat, 15 Jun 2024 05:26:45 +0200 Subject: [PATCH] Fix Turnstile unable to read the siteKey (#1728) It seems that Nuxt Turnstile's way of setting the key in `runtimeConfig` is broken and doesn't work properly, resulting in an error in runtime, because it has to be set. This commit sets the key in `runtimeConfig` manually instead, which seems to fix the issue. --- nuxt.config.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index fcc2090134..c18ecbd14a 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -305,6 +305,8 @@ export default defineNuxtConfig({ // @ts-ignore globalThis.CF_PAGES_COMMIT_SHA || 'unknown', + + turnstile: { siteKey: '0x4AAAAAAAW3guHM6Eunbgwu' }, }, }, typescript: { @@ -362,9 +364,6 @@ export default defineNuxtConfig({ } }, }, - turnstile: { - siteKey: '0x4AAAAAAAW3guHM6Eunbgwu', - }, nitro: { moduleSideEffects: ['@vintl/compact-number/locale-data'], },