mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 03:55:18 +00:00
mastodon now requires 'host' header be signed - in addition to digest and date
This commit is contained in:
parent
7100021b08
commit
2a177ffd14
1 changed files with 3 additions and 1 deletions
|
@ -232,13 +232,15 @@ class Queue {
|
|||
$channel = channelx_by_n($outq['outq_channel']);
|
||||
|
||||
$retries = 0;
|
||||
|
||||
$m = parse_url($outq['outq_posturl']);
|
||||
|
||||
$headers = [];
|
||||
$headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ;
|
||||
$ret = $outq['outq_msg'];
|
||||
logger('ActivityPub send: ' . jindent($ret), LOGGER_DATA);
|
||||
$headers['Date'] = datetime_convert('UTC','UTC', 'now', 'D, d M Y H:i:s \\G\\M\\T');
|
||||
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
|
||||
$headers['Host'] = $m['host'];
|
||||
$headers['(request-target)'] = 'post ' . get_request_string($outq['outq_posturl']);
|
||||
|
||||
$xhead = HTTPSig::create_sig($headers,$channel['channel_prvkey'],channel_url($channel));
|
||||
|
|
Loading…
Reference in a new issue