@@ -70,7 +70,7 @@ class LoginController extends Controller
'password' => 'required|string|min:6',
];
- if(config('captcha.enabled')) {
+ if(config('captcha.enabled') || config('captcha.active.login')) {
$rules['h-captcha-response'] = 'required|captcha';
}
@@ -137,7 +137,7 @@ class RegisterController extends Controller
'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed',
+ if(config('captcha.enabled') || config('captcha.active.register')) {
@@ -12,4 +12,9 @@ return [
'attributes' => [
'theme' => 'light'
],
-];
+
+ 'active' => [
+ 'login' => env('CAPTCHA_ENABLED_ON_LOGIN', false),
+ 'register' => env('CAPTCHA_ENABLED_ON_REGISTER', false)
+ ]
+];
@@ -50,7 +50,7 @@
</div>
- @if(config('captcha.enabled'))
+ @if(config('captcha.enabled') || config('captcha.active.login'))
<div class="d-flex justify-content-center mb-3">
{!! Captcha::display() !!}
@@ -81,7 +81,7 @@
+ @if(config('captcha.enabled') || config('captcha.active.register'))
<div class="d-flex justify-content-center my-3">