extend the default accept header

This commit is contained in:
Mike Macgirvin 2024-03-07 21:36:32 +11:00
parent a727f0d3da
commit 9eae251903
2 changed files with 3 additions and 2 deletions

View file

@ -150,7 +150,7 @@ class Activity
logger('fetch_actual: ' . $url, LOGGER_DEBUG);
$default_accept_header = 'application/activity+json, application/x-zot-activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
$default_accept_header = 'application/activity+json, application/ld+json, application/x-zot-activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
if ($channel) {
$accept_header = PConfig::Get($channel['channel_id'],'system','accept_header');
@ -158,6 +158,7 @@ class Activity
if (!$accept_header) {
$accept_header = Config::Get('system', 'accept_header', $default_accept_header);
}
$headers = [
'Accept' => $accept_header,
'Host' => $parsed['host'],

View file

@ -2587,7 +2587,7 @@ class Channel
}
if ($channel['channel_address'] === App::get_hostname() || intval($channel['channel_system'])) {
return z_root() . '?operation=rsakey';
return z_root() . '?operation=rsakey';
}
return (($channel) ? z_root() . '/channel/' . $channel['channel_address'] : z_root()) . '?operation=rsakey';