Correct content type
This commit is contained in:
parent
a8b776c189
commit
761bdafa34
|
@ -55,6 +55,7 @@ function profile_init(App $a)
|
||||||
if (DBA::isResult($user)) {
|
if (DBA::isResult($user)) {
|
||||||
$data = ActivityPub::profile($user['uid']);
|
$data = ActivityPub::profile($user['uid']);
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
header('Content-Type: application/activity+json');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -834,8 +834,9 @@ class ActivityPub
|
||||||
{
|
{
|
||||||
$ret = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
|
$ret = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
|
||||||
if (!$ret['success'] || empty($ret['body'])) {
|
if (!$ret['success'] || empty($ret['body'])) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_decode($ret['body'], true);
|
return json_decode($ret['body'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue