Add hCaptcha

This commit is contained in:
Daniel Supernault 2020-12-12 21:04:59 -07:00
parent f38136b499
commit 082c1ccb26
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
8 changed files with 115 additions and 7 deletions

View file

@ -118,6 +118,10 @@ class RegisterController extends Controller
'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed',
];
if(config('captcha.enabled')) {
$rules['h-captcha-response'] = 'required|captcha';
}
return Validator::make($data, $rules);
}