mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-15 21:48:08 +03:00
Replace reCAPTCHA with Turnstile (#589)
* add laravel turnstile * add config & settings for turnstile * publish view to center captcha * completely replace reCAPTCHA * update FailedCaptcha event * add back config for domain verification * don't set language so browser lang is used
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* Enable or disable captchas
|
||||
*/
|
||||
'enabled' => env('RECAPTCHA_ENABLED', true),
|
||||
|
||||
/*
|
||||
* API endpoint for recaptcha checks. You should not edit this.
|
||||
*/
|
||||
'domain' => env('RECAPTCHA_DOMAIN', 'https://www.google.com/recaptcha/api/siteverify'),
|
||||
|
||||
/*
|
||||
* Use a custom secret key, we use our public one by default
|
||||
*/
|
||||
'secret_key' => env('RECAPTCHA_SECRET_KEY', '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'),
|
||||
'_shipped_secret_key' => '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5',
|
||||
|
||||
/*
|
||||
* Use a custom website key, we use our public one by default
|
||||
*/
|
||||
'website_key' => env('RECAPTCHA_WEBSITE_KEY', '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn'),
|
||||
'_shipped_website_key' => '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn',
|
||||
|
||||
/*
|
||||
* Domain verification is enabled by default and compares the domain used when solving the captcha
|
||||
* as public keys can't have domain verification on google's side enabled (obviously).
|
||||
*/
|
||||
'verify_domain' => true,
|
||||
];
|
||||
15
config/turnstile.php
Normal file
15
config/turnstile.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'turnstile_enabled' => env('TURNSTILE_ENABLED', false),
|
||||
|
||||
'turnstile_site_key' => env('TURNSTILE_SITE_KEY', null),
|
||||
'turnstile_secret_key' => env('TURNSTILE_SECRET_KEY', null),
|
||||
|
||||
'turnstile_verify_domain' => env('TURNSTILE_VERIFY_DOMAIN', true),
|
||||
|
||||
'error_messages' => [
|
||||
'turnstile_check_message' => 'Captcha failed! Please refresh and try again.',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user