Add CloudFlare Turnstile captcha example (#18098)

Added reCaptcha example for CloudFlare Turnstile

Cloudflare Developer Page for Turnstile: https://developers.cloudflare.com/turnstile/get-started/

Pull-Request: #18098
Cherry-picked-from: d10b5d9e4e

Signed-off-by: SlushUwU <rolgoy@satowa-network.eu>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Co-authored-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
SlushUwU 2023-02-22 13:14:10 +01:00 committed by William Desportes
parent 59b4fdbea0
commit 9188cf251b
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -4071,3 +4071,20 @@ reCaptcha using hCaptcha
.. seealso:: `hCaptcha website <https://www.hcaptcha.com/>`_
.. seealso:: `hCaptcha Developer Guide <https://docs.hcaptcha.com/>`_
reCaptcha using Turnstile
+++++++++++++++++++++++++
.. code-block:: php
$cfg['CaptchaMethod'] = 'checkbox';
$cfg['CaptchaApi'] = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
$cfg['CaptchaCsp'] = 'https://challenges.cloudflare.com https://static.cloudflareinsights.com';
$cfg['CaptchaRequestParam'] = 'cf-turnstile';
$cfg['CaptchaResponseParam'] = 'cf-turnstile-response';
$cfg['CaptchaLoginPublicKey'] = '0xxxxxxxxxxxxxxxxxxxxxx';
$cfg['CaptchaLoginPrivateKey'] = '0x4AAAAAAAA_xx_xxxxxxxxxxxxxxxxxxxx';
$cfg['CaptchaSiteVerifyURL'] = 'https://challenges.cloudflare.com/turnstile/v0/siteverify';
.. seealso:: `Cloudflare Dashboard <https://dash.cloudflare.com/>`_
.. seealso:: `Turnstile Developer Guide <https://developers.cloudflare.com/turnstile/get-started/>`_