diff --git a/inc/config.php b/inc/config.php index 7609feba..348b6616 100644 --- a/inc/config.php +++ b/inc/config.php @@ -328,33 +328,38 @@ 'answer' => '4' ); */ - /** - * The captcha is dynamically injected on the client if the server replies with the `captcha-required` cookie set - * to 1. - * Use false to disable this configuration, otherwise, set the IP that vichan should check for captcha responses. - */ - $config['dynamic_captcha'] = false; - - // Enable reCaptcha to make spam even harder. Rarely necessary. - $config['recaptcha'] = false; - - // Public and private key pair from https://www.google.com/recaptcha/admin/create - $config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f'; - $config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_'; - - // Enable hCaptcha. - $config['hcaptcha'] = false; - - // Public and private key pair for using hCaptcha. - $config['hcaptcha_public'] = '7a4b21e0-dc53-46f2-a9f8-91d2e74b63a0'; - $config['hcaptcha_private'] = '0x4e9A01bE637b51dC41a7Ea9865C3fDe4aB72Cf17'; - - // Enable Cloudflare's Turnstile captcha. - $config['turnstile'] = false; - - // Public and private key pair for turnstile. - $config['turnstile_public'] = ''; - $config['turnstile_private'] = ''; + // Enable a captcha system to make spam even harder. Rarely necessary. + $config['captcha'] = [ + /** + * Select the captcha backend, false to disable. + * Can be false, "recaptcha", "hcaptcha" or "turnstile". + */ + 'mode' => false, + /** + * The captcha is dynamically injected on the client if the server replies with the `captcha-required` cookie set + * to 1. + * Use false to disable this configuration, otherwise, set the IP that vichan should check for captcha responses. + */ + 'dynamic' => false, + // Configure Google reCAPTCHA. + 'recaptcha' => [ + // Public and private key pair from https://www.google.com/recaptcha/admin/create + 'public' => '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f', + 'private' => '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_', + ], + // Configure hCaptcha. + 'hcaptcha' => [ + // Public and private key pair for using hCaptcha. + 'public' => '7a4b21e0-dc53-46f2-a9f8-91d2e74b63a0', + 'private' => '0x4e9A01bE637b51dC41a7Ea9865C3fDe4aB72Cf17', + ], + // Configure Cloudflare Turnstile. + '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 $config['board_locked'] = false;