config.php: refactor captcha configuration

This commit is contained in:
Zankaria 2024-10-28 11:24:57 +01:00
parent 6fdc16d2f3
commit 04ef961440

View file

@ -328,33 +328,38 @@
'answer' => '4' 'answer' => '4'
); );
*/ */
/** // Enable a captcha system to make spam even harder. Rarely necessary.
* The captcha is dynamically injected on the client if the server replies with the `captcha-required` cookie set $config['captcha'] = [
* to 1. /**
* Use false to disable this configuration, otherwise, set the IP that vichan should check for captcha responses. * Select the captcha backend, false to disable.
*/ * Can be false, "recaptcha", "hcaptcha" or "turnstile".
$config['dynamic_captcha'] = false; */
'mode' => false,
// Enable reCaptcha to make spam even harder. Rarely necessary. /**
$config['recaptcha'] = false; * The captcha is dynamically injected on the client if the server replies with the `captcha-required` cookie set
* to 1.
// Public and private key pair from https://www.google.com/recaptcha/admin/create * Use false to disable this configuration, otherwise, set the IP that vichan should check for captcha responses.
$config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f'; */
$config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_'; 'dynamic' => false,
// Configure Google reCAPTCHA.
// Enable hCaptcha. 'recaptcha' => [
$config['hcaptcha'] = false; // Public and private key pair from https://www.google.com/recaptcha/admin/create
'public' => '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f',
// Public and private key pair for using hCaptcha. 'private' => '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_',
$config['hcaptcha_public'] = '7a4b21e0-dc53-46f2-a9f8-91d2e74b63a0'; ],
$config['hcaptcha_private'] = '0x4e9A01bE637b51dC41a7Ea9865C3fDe4aB72Cf17'; // Configure hCaptcha.
'hcaptcha' => [
// Enable Cloudflare's Turnstile captcha. // Public and private key pair for using hCaptcha.
$config['turnstile'] = false; 'public' => '7a4b21e0-dc53-46f2-a9f8-91d2e74b63a0',
'private' => '0x4e9A01bE637b51dC41a7Ea9865C3fDe4aB72Cf17',
// Public and private key pair for turnstile. ],
$config['turnstile_public'] = ''; // Configure Cloudflare Turnstile.
$config['turnstile_private'] = ''; 'turnstile' => [
// Public and private key pair for turnstile.
'public' => '',
'private' => '',
]
];
// Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board // Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board
$config['board_locked'] = false; $config['board_locked'] = false;