CF-Changes Turnstile - Turnstile in China

Cloudflare Reporting - Product Changelog

ENF News Bot

Automated News Bot
Joined
Apr 15, 2022
Messages
4,508
Turnstile in China is now available. Challenges and token validation use endpoints within Mainland China, eliminating cross-border network calls and making Turnstile 10x faster. For businesses serving customers in China, that means less waiting during signups, logins, and other protected interactions.

Turnstile in China is included with the Turnstile Enterprise plan. To get Turnstile Enterprise, contact your account team. A China Network subscription is not required.

When creating a widget, select China as its region via the dashboard, API, or Terraform. You cannot change the region after creating the widget.

For example, select China for your Widget region in the dashboard:

Widget region options in the dashboard and a warning that the region cannot be changed after creation

Or set region to china if using the API:


Code:
{
	"name": "Widget for China Domains",
	"domains": ["example.cn"],
	"mode": "managed",
	"region": "china"
}

During implementation, use the China-hosted script for client-side rendering and the China Siteverify endpoint on the same domain for server-side token validation.

China client-side scripthtml

Code:
<script
	src="https://challenges.cloudflare-cn.com/turnstile/v0/api.js"
	async
	defer
></script>
China Siteverify requestshell

Code:
curl https://challenges.cloudflare-cn.com/turnstile/v0/siteverify \
  --request POST \
  --data-urlencode "secret=YOUR_SECRET_KEY" \
  --data-urlencode "response=TOKEN_FROM_WIDGET"

For implementation guidance, refer to Turnstile in China.

Continue reading...
 
Back
Top