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

94 lines
3.7 KiB
PHTML

6 years ago
<?php
4 weeks ago
use Buzz\LaravelHCaptcha\HttpClient;
6 years ago
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
|--------------------------------------------------------------------------
| Canonical, provider-namespaced credentials used throughout the app.
*/
'hcaptcha' => [
'secret' => env('CAPTCHA_SECRET', 'default_secret'),
'sitekey' => env('CAPTCHA_SITEKEY', 'default_sitekey'),
],
/*
| The top-level secret/sitekey keys below are what the buzz/laravel-h-captcha
| package reads internally (config('captcha.secret') / config('captcha.sitekey')).
| They mirror captcha.hcaptcha.* and are kept in sync when settings are saved.
*/
6 years ago
'secret' => env('CAPTCHA_SECRET', 'default_secret'),
'sitekey' => env('CAPTCHA_SITEKEY', 'default_sitekey'),
4 weeks ago
'http_client' => HttpClient::class,
6 years ago
'options' => [
'multiple' => false,
'lang' => app()->getLocale(),
],
'attributes' => [
4 weeks ago
'theme' => 'light',
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),
],
/*
|--------------------------------------------------------------------------
| Cap (self-hosted proof-of-work CAPTCHA)
|--------------------------------------------------------------------------
1 week ago
| The endpoint is the instance base URL WITHOUT the site key, e.g.
| https://cap.example.com. The site key is a separate value; the full API
| endpoint (https://cap.example.com/your-site-key/) is composed by CapDriver.
1 week ago
*/
'cap' => [
'endpoint' => env('CAP_ENDPOINT'),
1 week ago
'sitekey' => env('CAP_SITEKEY'),
1 week ago
'secret' => env('CAP_SECRET'),
'token_field' => env('CAP_TOKEN_FIELD', 'cap-token'),
'timeout' => (int) env('CAP_TIMEOUT', 5),
'fail_open' => (bool) env('CAP_FAIL_OPEN', false),
'widget_version' => env('CAP_WIDGET_VERSION') ?: 'latest',
],
/*
|--------------------------------------------------------------------------
| Where captcha is active
|--------------------------------------------------------------------------
| Per-surface toggles. Each requires the global "enabled" flag to also be on.
*/
'active' => [
4 weeks ago
'login' => env('CAPTCHA_ENABLED_ON_LOGIN', false),
'register' => env('CAPTCHA_ENABLED_ON_REGISTER', false),
1 week ago
'forgotpassword' => env('CAPTCHA_ENABLED_ON_FORGOT_PASSWORD', false),
'password_reset' => env('CAPTCHA_ENABLED_ON_PASSWORD_RESET', false),
'curated_register' => env('CAPTCHA_ENABLED_ON_CURATED_REGISTER', false),
],
];