Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Fix Turnstile unable to read the siteKey (#1728) (#1729)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Sasha Sorokin <[email protected]>
  • Loading branch information
Prospector and brawaru authored Jun 15, 2024
1 parent 05d45d9 commit 7b861cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ export default defineNuxtConfig({
// @ts-ignore
globalThis.CF_PAGES_COMMIT_SHA ||
'unknown',

turnstile: { siteKey: '0x4AAAAAAAW3guHM6Eunbgwu' },
},
},
typescript: {
Expand Down Expand Up @@ -362,9 +364,6 @@ export default defineNuxtConfig({
}
},
},
turnstile: {
siteKey: '0x4AAAAAAAW3guHM6Eunbgwu',
},
nitro: {
moduleSideEffects: ['@vintl/compact-number/locale-data'],
},
Expand Down

0 comments on commit 7b861cf

Please sign in to comment.