本文へスキップ
記事中級

条件付きで Turnstile を適用する

Transform Rule または Worker の HTMLRewriter を使い、特定のリクエストにだけ Turnstile を表示します(承認済みエージェントには表示しないなど)。

最終更新
2026年11月17日
元の記事を読む

この紹介文は現在英語版のみです。

Sometimes only some visitors should see Turnstile — for example, an approved agent submitting a form. This tutorial shows two approaches: pass request information to your site in a header with a Transform Rule, or remove the widget from the response with HTMLRewriter in a Worker.

What you’ll learn

  • Use a Transform Rule to flag selected agents
  • Use HTMLRewriter to strip the widget for some requests

Cloudflare products used

Turnstile, Rules, Workers.

Follow the full, step-by-step tutorial in Cloudflare’s documentation.

さらに学ぶ