Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-turnstile-html-rewriter-with-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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