Skip to content

Commit 5ad015e

Browse files
edits
1 parent 4a264d1 commit 5ad015e

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/content/docs/turnstile/get-started/client-side-rendering/widget-configurations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,12 @@ When enabled, Turnstile automatically creates a hidden `<input>` element with th
486486

487487
```html title="Responsive design widget" wrap
488488
<div style="max-width: 500px;">
489-
<div class="cf-turnstile" data-sitekey="your-site-key" data-size="flexible" data-theme="auto"></div>
489+
<div class="cf-turnstile" data-sitekey=<YOUR-SITE-KEY> data-size="flexible" data-theme="auto"></div>
490490
</div>
491491

492492
```
493493

494494
```html title="Mobile-optimized compact widget" wrap
495-
<div class="cf-turnstile" data-sitekey="your-site-key" data-size="compact" data-theme="light" data-language="en">
495+
<div class="cf-turnstile" data-sitekey=<YOUR-SITE-KEY> data-size="compact" data-theme="light" data-language="en">
496496
</div>
497497
```

src/content/docs/turnstile/get-started/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Refer to [Migration](/turnstile/migration/) for step-by-step migration guidance
101101
- **Protect secret keys**: Never expose secret keys in client-side code.
102102
- **Rotate keys regularly**: Use API or dashboard to rotate secret keys periodically.
103103
- **Restrict hostnames**: Only allow widgets on domains you control.
104-
**Monitor usage**: Use analytics to detect unusual patterns.
104+
- **Monitor usage**: Use analytics to detect unusual patterns.
105105

106106
### Operational
107107

src/content/docs/turnstile/get-started/server-side-validation.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Client-side verification alone leaves major security vulnerabilities.
2828

2929
## Siteverify API overview
3030

31-
```txt title="Endpoint"
31+
```shell title="Endpoint"
3232
POST https://challenges.cloudflare.com/turnstile/v0/siteverify
3333
```
3434

@@ -647,22 +647,22 @@ if (result.success) {
647647

648648
### Security
649649

650-
- Store secret keys securely. Use environment variables or secure key management.
651-
- Validate the token on every request. Never trust client-side validation alone.
652-
- Check additional fields. Validate the action and hostname when specified.
653-
- Monitor for abuse. Log failed validations and unusual patterns.
654-
- Use HTTPS. Always validate over secure connections.
650+
- **Store secret keys securely**: Use environment variables or secure key management.
651+
- **Validate the token on every request**: Never trust client-side validation alone.
652+
- **Check additional fields**: Validate the action and hostname when specified.
653+
- **Monitor for abuse**: Log failed validations and unusual patterns.
654+
- **Use HTTPS**: Always validate over secure connections.
655655

656656
### Performance
657657

658-
- Set reasonable timeouts. Do not wait indefinitely for Siteverify responses.
659-
- Implement retry logic.
660-
- Cache validation results for the same token, if needed for your flow.
661-
- Monitor API latency. Track Siteverify response times.
658+
- **Set reasonable timeouts**: Do not wait indefinitely for Siteverify responses.
659+
- Implement retry logic**: Handle temporary network issues.
660+
- **Cache validation results**: Cache validation results for the same token, if needed for your flow.
661+
- **Monitor API latency**: Track Siteverify response times.
662662

663663
### Error handling
664664

665-
- Have fallback behavior for API failures.
666-
- Do not expose internal error details to users.
667-
- Properly log errors for debugging without exposing secrets.
668-
- Rate limit. Protect against validation flooding.
665+
- **Degreadation**: Have fallback behavior for API failures.
666+
- **User-friendly messaging**: Do not expose internal error details to users.
667+
- **Proper logging**: Log errors for debugging without exposing secrets.
668+
- **Rate limit**: Protect against validation flooding.

0 commit comments

Comments
 (0)