Explorar o código

Update ProfileController

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
610c4f3445
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Http/Controllers/ProfileController.php

+ 4 - 0
app/Http/Controllers/ProfileController.php

@@ -150,6 +150,8 @@ class ProfileController extends Controller
 
     public function showActivityPub(Request $request, $user)
     {
+        abort_if(!config('federation.activitypub.enabled'), 404);
+        
         if($user->status != null) {
             return ProfileController::accountCheck($user);
         }
@@ -161,6 +163,8 @@ class ProfileController extends Controller
 
     public function showAtomFeed(Request $request, $user)
     {
+        abort_if(!config('federation.atom.enabled'), 404);
+
         $profile = $user = Profile::whereNull('status')->whereNull('domain')->whereUsername($user)->whereIsPrivate(false)->firstOrFail();
         if($profile->status != null) {
             return $this->accountCheck($profile);