You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/config/captcha.php

78 lines
3.2 KiB
PHTML

6 years ago
<?php
return [
1 week ago
/*
|--------------------------------------------------------------------------
| Global toggle
|--------------------------------------------------------------------------
| Whether any captcha is enabled at all. Kept for backward compatibility.
*/
6 years ago
'enabled' => env('CAPTCHA_ENABLED', false),
1 week ago
/*
|--------------------------------------------------------------------------
| Active driver
|--------------------------------------------------------------------------
| Which provider to use: "hcaptcha", "turnstile", or "cap". Admin-selectable.
| Defaults to hcaptcha so existing instances keep their current behavior.
*/
'driver' => env('CAPTCHA_DRIVER', 'hcaptcha'),
/*
|--------------------------------------------------------------------------
| hCaptcha
|--------------------------------------------------------------------------
*/
'hcaptcha' => [
1 week ago
'secret' => env('CAPTCHA_H_SECRET', 'default_secret'),
'sitekey' => env('CAPTCHA_H_SITEKEY', 'default_sitekey'),
1 week ago
'timeout' => (int) env('CAPTCHA_H_TIMEOUT', 5),
'fail_open' => (bool) env('CAPTCHA_H_FAIL_OPEN', false),
1 week ago
'lang' => env('CAPTCHA_H_LANG'), // Optional widget locale (e.g. "fr"). Null uses hCaptcha auto-detection.
6 years ago
],
1 week ago
/*
|--------------------------------------------------------------------------
| Cloudflare Turnstile
|--------------------------------------------------------------------------
*/
'turnstile' => [
'sitekey' => env('CAPTCHA_TURNSTILE_SITEKEY'),
'secret' => env('CAPTCHA_TURNSTILE_SECRET'),
'timeout' => (int) env('CAPTCHA_TURNSTILE_TIMEOUT', 5),
'fail_open' => (bool) env('CAPTCHA_TURNSTILE_FAIL_OPEN', false),
],
/*
|--------------------------------------------------------------------------
1 week ago
| Cap
1 week ago
|--------------------------------------------------------------------------
1 week ago
| The endpoint is the instance base URL WITHOUT the site key, e.g.
| https://cap.example.com. The site key/secret are separate values;
1 week ago
*/
'cap' => [
1 week ago
'endpoint' => env('CAPTCHA_CAP_ENDPOINT'),
'sitekey' => env('CAPTCHA_CAP_SITEKEY'),
'secret' => env('CAPTCHA_CAP_SECRET'),
'token_field' => env('CAPTCHA_CAP_TOKEN_FIELD', 'cap-token'),
'timeout' => (int) env('CAPTCHA_CAP_TIMEOUT', 5),
'fail_open' => (bool) env('CAPTCHA_CAP_FAIL_OPEN', false),
'widget_version' => env('CAPTCHA_CAP_WIDGET_VERSION') ?: 'latest',
1 week ago
],
/*
|--------------------------------------------------------------------------
| Where captcha is active
|--------------------------------------------------------------------------
| Per-surface toggles. Each requires the global "enabled" flag to also be on.
*/
'active' => [
1 week ago
'login' => env('CAPTCHA_ENABLED_ON_LOGIN', true),
'register' => env('CAPTCHA_ENABLED_ON_REGISTER', true),
'curated_register' => env('CAPTCHA_ENABLED_ON_CURATED_REGISTER', true),
1 week ago
'forgot_email' => env('CAPTCHA_ENABLED_ON_FORGOT_EMAIL', true),
'forgot_password' => env('CAPTCHA_ENABLED_ON_FORGOT_PASSWORD', true),
'password_reset' => env('CAPTCHA_ENABLED_ON_PASSWORD_RESET', true),
],
];