mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update ApiV1Dot1Controller, use config_cache for in-app registration
This commit is contained in:
parent
7785a2dae4
commit
b0cb4456a9
1 changed files with 5 additions and 5 deletions
|
@ -473,15 +473,15 @@ class ApiV1Dot1Controller extends Controller
|
|||
{
|
||||
return [
|
||||
'open' => (bool) config_cache('pixelfed.open_registration'),
|
||||
'iara' => config('pixelfed.allow_app_registration')
|
||||
'iara' => (bool) config_cache('pixelfed.allow_app_registration'),
|
||||
];
|
||||
}
|
||||
|
||||
public function inAppRegistration(Request $request)
|
||||
{
|
||||
abort_if($request->user(), 404);
|
||||
abort_unless(config_cache('pixelfed.open_registration'), 404);
|
||||
abort_unless(config('pixelfed.allow_app_registration'), 404);
|
||||
abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
|
||||
abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
|
||||
abort_unless($request->hasHeader('X-PIXELFED-APP'), 403);
|
||||
if(config('pixelfed.bouncer.cloud_ips.ban_signups')) {
|
||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
|
@ -609,8 +609,8 @@ class ApiV1Dot1Controller extends Controller
|
|||
public function inAppRegistrationConfirm(Request $request)
|
||||
{
|
||||
abort_if($request->user(), 404);
|
||||
abort_unless(config_cache('pixelfed.open_registration'), 404);
|
||||
abort_unless(config('pixelfed.allow_app_registration'), 404);
|
||||
abort_unless((bool) config_cache('pixelfed.open_registration'), 404);
|
||||
abort_unless((bool) config_cache('pixelfed.allow_app_registration'), 404);
|
||||
abort_unless($request->hasHeader('X-PIXELFED-APP'), 403);
|
||||
if(config('pixelfed.bouncer.cloud_ips.ban_signups')) {
|
||||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
|
|
Loading…
Reference in a new issue