From 217922466a649058de013154abbfafa514330351 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 2 Feb 2022 17:55:29 -0700 Subject: [PATCH] Update InstanceActorController, fix content-type header --- app/Http/Controllers/InstanceActorController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/InstanceActorController.php b/app/Http/Controllers/InstanceActorController.php index 52d8a5cc6..0eb796732 100644 --- a/app/Http/Controllers/InstanceActorController.php +++ b/app/Http/Controllers/InstanceActorController.php @@ -14,7 +14,7 @@ class InstanceActorController extends Controller $res = (new InstanceActor())->first()->getActor(); return json_encode($res, JSON_UNESCAPED_SLASHES); }); - return response($res)->header('Content-Type', 'application/json'); + return response($res)->header('Content-Type', 'application/activity+json'); } public function inbox() @@ -24,14 +24,14 @@ class InstanceActorController extends Controller public function outbox() { - $res = [ + $res = json_encode([ '@context' => 'https://www.w3.org/ns/activitystreams', 'id' => config('app.url') . '/i/actor/outbox', 'type' => 'OrderedCollection', 'totalItems' => 0, 'first' => config('app.url') . '/i/actor/outbox?page=true', 'last' => config('app.url') . '/i/actor/outbox?min_id=0page=true' - ]; - return response()->json($res); + ], JSON_UNESCAPED_SLASHES); + return response($res)->header('Content-Type', 'application/activity+json'); } }