mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update InstanceActorController, fix content-type header
This commit is contained in:
parent
ffa36125f9
commit
217922466a
1 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ class InstanceActorController extends Controller
|
||||||
$res = (new InstanceActor())->first()->getActor();
|
$res = (new InstanceActor())->first()->getActor();
|
||||||
return json_encode($res, JSON_UNESCAPED_SLASHES);
|
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()
|
public function inbox()
|
||||||
|
@ -24,14 +24,14 @@ class InstanceActorController extends Controller
|
||||||
|
|
||||||
public function outbox()
|
public function outbox()
|
||||||
{
|
{
|
||||||
$res = [
|
$res = json_encode([
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
'id' => config('app.url') . '/i/actor/outbox',
|
'id' => config('app.url') . '/i/actor/outbox',
|
||||||
'type' => 'OrderedCollection',
|
'type' => 'OrderedCollection',
|
||||||
'totalItems' => 0,
|
'totalItems' => 0,
|
||||||
'first' => config('app.url') . '/i/actor/outbox?page=true',
|
'first' => config('app.url') . '/i/actor/outbox?page=true',
|
||||||
'last' => config('app.url') . '/i/actor/outbox?min_id=0page=true'
|
'last' => config('app.url') . '/i/actor/outbox?min_id=0page=true'
|
||||||
];
|
], JSON_UNESCAPED_SLASHES);
|
||||||
return response()->json($res);
|
return response($res)->header('Content-Type', 'application/activity+json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue