feat: activate Cloudflare Turnstile for sag24.ru contact form
Set site key and secret key for sag24-website-contact-form widget Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,7 +62,7 @@ if (mb_strlen($phone) > 30) { http_response_code(400); echo json_encode(['error
|
|||||||
if (mb_strlen($message) > 5000) { http_response_code(400); echo json_encode(['error' => 'Message too long']); exit; }
|
if (mb_strlen($message) > 5000) { http_response_code(400); echo json_encode(['error' => 'Message too long']); exit; }
|
||||||
|
|
||||||
// ─── Cloudflare Turnstile verification ───────────────────────────────────────
|
// ─── Cloudflare Turnstile verification ───────────────────────────────────────
|
||||||
$TURNSTILE_SECRET = ''; // TODO: Create widget at dash.cloudflare.com → Turnstile → Add site (sag24.ru)
|
$TURNSTILE_SECRET = '0x4AAAAAACrQSySNBa2C2FWQq2ty1_UyLhc';
|
||||||
if ($TURNSTILE_SECRET) {
|
if ($TURNSTILE_SECRET) {
|
||||||
if (!$turnstileToken) {
|
if (!$turnstileToken) {
|
||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ export const FORM_ENDPOINT = '/api/contact.php'
|
|||||||
export const EMAIL = 'info@sag24.ru'
|
export const EMAIL = 'info@sag24.ru'
|
||||||
|
|
||||||
// Cloudflare Turnstile — создать виджет: dash.cloudflare.com → Turnstile → Add site (sag24.ru)
|
// Cloudflare Turnstile — создать виджет: dash.cloudflare.com → Turnstile → Add site (sag24.ru)
|
||||||
export const TURNSTILE_SITE_KEY = ''
|
export const TURNSTILE_SITE_KEY = '0x4AAAAAACrQS-dAb7E9RGPQ'
|
||||||
|
|||||||
Reference in New Issue
Block a user