Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/cloudflare turnstile #245

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default {
config: 'Root Settings',
file_config: 'File Config',
interface: 'Interface (UI)',
turnstile: 'Cloudflare Turnstile',
model_specs: 'Model Specs',
registration: 'Registration',
agents: 'Agents',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Cloudflare Turnstile Configuration

## Example

```yaml filename="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:**
<OptionTable
options={[
['turnstile', 'Object', 'Cloudflare Turnstile configuration that integrates a CAPTCHA alternative to protect your application from automated abuse.'],
]}
/>

### Fields

<OptionTable
options={[
['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](https://developers.cloudflare.com/turnstile/get-started/) guide.
- **Example:**
```yaml
turnstile:
siteKey: "your-site-key-here"
```

#### options

- **Type:** `Object`
- **Description:** An object to configure additional settings for the Turnstile widget.

**Subkeys:**
<OptionTable
options={[
['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'],
]}
/>

```yaml
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.

---
Loading