cloudflare · Cloudflare Workers Docs
Examples Turnstile with Workers
Demonstrates how to use the HTMLRewriter API within a Cloudflare Worker to implicitly inject Turnstile CAPTCHA widgets into HTML elements.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Examples Turnstile with Workers
Demonstrates how to use the HTMLRewriter API within a Cloudflare Worker to implicitly inject Turnstile CAPTCHA widgets into HTML elements.
When To Use
Use when you need to automatically inject Turnstile CAPTCHA widgets into existing HTML content using Cloudflare Workers and the HTMLRewriter API.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-turnstile-html-rewriter-with-workflow-guide.md | A markdown document demonstrating how to use the HTMLRewriter API in Cloudflare Workers to implicitly inject Turnstile into HTML elements. | Questions about a markdown document demonstrating how to use the HTMLRewriter API in Cloudflare Workers to implicitly inject Turnstil... |
examples/workers-examples-turnstile-html-rewriter-with-cloudflare-workers-turnsti.text | A Cloudflare Worker script that uses the HTML Rewriter API to inject a Turnstile widget into a webpage. | Exact payloads, commands, or snippets shown in A Cloudflare Worker script that uses the HTML Rewriter API to inject a Turnstile widget into a webpage. |
examples/workers-examples-turnstile-html-rewriter-with-cloudflare-workers-turnsti-2.text | A Cloudflare Worker script that uses the HTML Rewriter API to inject a Turnstile widget into a webpage. | Exact payloads, commands, or snippets shown in A Cloudflare Worker script that uses the HTML Rewriter API to inject a Turnstile widget into a webpage. |
examples/workers-examples-turnstile-html-rewriter-with-cloudflare-workers-turnsti-3.text | A Hono-based Cloudflare Worker implementation that uses HTML Rewriter to inject a Turnstile widget into web pages. | Exact payloads, commands, or snippets shown in A Hono-based Cloudflare Worker implementation that uses HTML Rewriter to inject a Turnstile widget into web pages. |
examples/workers-examples-turnstile-html-rewriter-with-cloudflare-workers-turnsti-4.text | A Python implementation using Cloudflare Workers and HTMLRewriter to inject Turnstile widgets into HTML responses. | Exact payloads, commands, or snippets shown in A Python implementation using Cloudflare Workers and HTMLRewriter to inject Turnstile widgets into HTML responses. |
examples/workers-examples-turnstile-html-rewriter-with-cloudflare-workers-turnsti-5.text | A JavaScript function demonstrating how to validate a Cloudflare Turnstile token within a Workers environment using the HTML Rewriter. | Exact payloads, commands, or snippets shown in A JavaScript function demonstrating how to validate a Cloudflare Turnstile token within a Workers environment using t... |
What This Skill Covers
- Inject Turnstile implicitly into HTML elements using the HTMLRewriter runtime API.
- Main sections:
Tags.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/examples/turnstile-html-rewriter
