|
| 1 | +# Cloudflare Turnstile Configuration |
| 2 | + |
| 3 | +## Example |
| 4 | + |
| 5 | +```yaml filename="turnstile" |
| 6 | +turnstile: |
| 7 | + siteKey: "your-site-key-here" |
| 8 | + options: |
| 9 | + language: "auto" # "auto" or an ISO 639-1 language code (e.g., en) |
| 10 | + size: "normal" # Options: "normal", "compact", "flexible", or "invisible" |
| 11 | +``` |
| 12 | +
|
| 13 | +## turnstile |
| 14 | +
|
| 15 | +**Key:** |
| 16 | +<OptionTable |
| 17 | + options={[ |
| 18 | + ['turnstile', 'Object', 'Cloudflare Turnstile configuration that integrates a CAPTCHA alternative to protect your application from automated abuse.'], |
| 19 | + ]} |
| 20 | +/> |
| 21 | +
|
| 22 | +### Fields |
| 23 | +
|
| 24 | +<OptionTable |
| 25 | + options={[ |
| 26 | + ['siteKey', 'String', 'Your unique Cloudflare Turnstile site key. Register your domain with Cloudflare and obtain this key.', 'your-site-key-here'], |
| 27 | + ['options', 'Object', 'An object to customize additional settings for the Turnstile widget.'], |
| 28 | + ]} |
| 29 | +/> |
| 30 | +
|
| 31 | +#### siteKey |
| 32 | +
|
| 33 | +- **Type:** `String` |
| 34 | +- **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](https://developers.cloudflare.com/turnstile/get-started/) guide. |
| 35 | +- **Example:** |
| 36 | +```yaml |
| 37 | +turnstile: |
| 38 | + siteKey: "your-site-key-here" |
| 39 | +``` |
| 40 | + |
| 41 | +#### options |
| 42 | + |
| 43 | +- **Type:** `Object` |
| 44 | +- **Description:** An object to configure additional settings for the Turnstile widget. |
| 45 | + |
| 46 | +**Subkeys:** |
| 47 | +<OptionTable |
| 48 | + options={[ |
| 49 | + ['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'], |
| 50 | + ['size', 'String', 'Determines the widget\'s display size. Valid options include `normal`, `compact`, `flexible`, or `invisible`.', 'normal'], |
| 51 | + ]} |
| 52 | +/> |
| 53 | + |
| 54 | +```yaml |
| 55 | +turnstile: |
| 56 | + options: |
| 57 | + language: "auto" |
| 58 | + size: "normal" |
| 59 | +``` |
| 60 | + |
| 61 | +### Notes |
| 62 | + |
| 63 | +- **Optional Integration:** The `turnstile` configuration block is optional. If you choose not to use Cloudflare Turnstile, you may omit this block entirely. |
| 64 | +- **Dashboard Consistency:** Ensure that the values you configure here match your settings in the Cloudflare dashboard. |
| 65 | +- **User Experience:** Customize the `options` subkeys as needed to tailor the widget's behavior and appearance to your application’s requirements. |
| 66 | + |
| 67 | +--- |
0 commit comments