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', 'registration_status' => 'required|in:open,filtered,closed',
'cloud_storage' => 'required', 'cloud_storage' => 'required',
'activitypub_enabled' => 'required', 'activitypub_enabled' => 'required',
'authorized_fetch' => 'required',
'account_migration' => 'required', 'account_migration' => 'required',
'mobile_apis' => 'required', 'mobile_apis' => 'required',
'stories' => '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.activitypub.enabled', $request->boolean('activitypub_enabled'));
ConfigCacheService::put('federation.migration', $request->boolean('account_migration')); ConfigCacheService::put('federation.migration', $request->boolean('account_migration'));
ConfigCacheService::put('pixelfed.oauth_enabled', $request->boolean('mobile_apis')); ConfigCacheService::put('pixelfed.oauth_enabled', $request->boolean('mobile_apis'));

View File

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

View File

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

View File

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