Cloudflare Turnstile Configuration
Example
turnstile
turnstile:
siteKey: "your-site-key-here"
options:
language: "auto" # "auto" or an ISO 639-1 language code (e.g., en)
size: "normal" # Options: "normal", "compact", "flexible", or "invisible"
turnstile
Key:
Key | Type | Description | Example |
---|---|---|---|
turnstile | Object | Cloudflare Turnstile configuration that integrates a CAPTCHA alternative to protect your application from automated abuse. |
Fields
Key | Type | Description | Example |
---|---|---|---|
siteKey | String | Your unique Cloudflare Turnstile site key. Register your domain with Cloudflare and obtain this key. | your-site-key-here |
options | Object | An object to customize additional settings for the Turnstile widget. |
siteKey
- Type:
String
- Description: Your unique Cloudflare Turnstile site key. Make sure you have registered your domain with Cloudflare and obtained this key from the Cloudflare Turnstile Get Started guide.
- Example:
turnstile:
siteKey: "your-site-key-here"
options
- Type:
Object
- Description: An object to configure additional settings for the Turnstile widget.
Subkeys:
Key | Type | Description | Example |
---|---|---|---|
language | String | Specifies the language for the Turnstile widget. Use `auto` to automatically detect the user's language, or provide an ISO 639-1 language code (e.g., `en`). | auto |
size | String | Determines the widget's display size. Valid options include `normal`, `compact`, `flexible`, or `invisible`. | normal |
turnstile:
options:
language: "auto"
size: "normal"
Notes
- Optional Integration: The
turnstile
configuration block is optional. If you choose not to use Cloudflare Turnstile, you may omit this block entirely. - Dashboard Consistency: Ensure that the values you configure here match your settings in the Cloudflare dashboard.
- User Experience: Customize the
options
subkeys as needed to tailor the widget’s behavior and appearance to your application’s requirements.