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

Commit

Permalink
Read Turnstile keys from environment variables
Browse files Browse the repository at this point in the history
Turstile no longer reads the site key from the `turnstile` property of
`nuxt.config.ts`, instead it reads it from the runtime config. I've set
the properties to empty values, as without that they cannot be set using
the environment variables.

The actual keys must now be set via the `NUXT_PUBLIC_TURNSTILE_SITE_KEY`
and `NUXT_TURNSTILE_SECRET_KEY` environment variables.
  • Loading branch information
brawaru committed Jun 15, 2024
1 parent 05d45d9 commit 0fb2751
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ export default defineNuxtConfig({
// @ts-ignore
globalThis.CF_PAGES_COMMIT_SHA ||
'unknown',
turnstile: { siteKey: '' },
},
turnstile: {
secretKey: '',
},
},
typescript: {
Expand Down Expand Up @@ -362,9 +366,7 @@ export default defineNuxtConfig({
}
},
},
turnstile: {
siteKey: '0x4AAAAAAAW3guHM6Eunbgwu',
},
turnstile: {},
nitro: {
moduleSideEffects: ['@vintl/compact-number/locale-data'],
},
Expand Down

0 comments on commit 0fb2751

Please sign in to comment.