1
0
Fork 0
forked from mirror/pixelfed

Add Authorized Fetch

This commit is contained in:
Daniel Supernault 2024-08-01 21:47:04 -06:00
parent bdb8a5cab3
commit ea2a9eb42a
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
4 changed files with 6 additions and 0 deletions

View file

@ -531,6 +531,7 @@ trait AdminSettingsController
'registration_status' => 'required|in:open,filtered,closed',
'cloud_storage' => 'required',
'activitypub_enabled' => 'required',
'authorized_fetch' => 'required',
'account_migration' => 'required',
'mobile_apis' => 'required',
'stories' => 'required',
@ -555,6 +556,7 @@ trait AdminSettingsController
}
}
}
ConfigCacheService::put('federation.activitypub.authorized_fetch', $request->boolean('authorized_fetch'));
ConfigCacheService::put('federation.activitypub.enabled', $request->boolean('activitypub_enabled'));
ConfigCacheService::put('federation.migration', $request->boolean('account_migration'));
ConfigCacheService::put('pixelfed.oauth_enabled', $request->boolean('mobile_apis'));

View file

@ -37,6 +37,7 @@ class AdminSettingsService
'registration_status' => $regState,
'cloud_storage' => $cloud_ready && $cloud_storage,
'activitypub_enabled' => (bool) config_cache('federation.activitypub.enabled'),
'authorized_fetch' => (bool) config_cache('federation.activitypub.authorized_fetch'),
'account_migration' => (bool) config_cache('federation.migration'),
'mobile_apis' => (bool) config_cache('pixelfed.oauth_enabled'),
'stories' => (bool) config_cache('instance.stories.enabled'),

View file

@ -46,6 +46,7 @@ class ConfigCacheService
'pixelfed.oauth_enabled',
'pixelfed.import.instagram.enabled',
'pixelfed.bouncer.enabled',
'federation.activitypub.authorized_fetch',
'pixelfed.enforce_email_verification',
'pixelfed.max_account_size',

View file

@ -30,6 +30,8 @@ return [
'ingest' => [
'store_notes_without_followers' => env('AP_INGEST_STORE_NOTES_WITHOUT_FOLLOWERS', false),
],
'authorized_fetch' => env('AUTHORIZED_FETCH', false),
],
'atom' => [