commenting from federation

This commit is contained in:
lesion
2019-08-01 15:18:45 +02:00
parent 37b63fc767
commit 5b013829fe
11 changed files with 137 additions and 21 deletions

View File

@@ -23,12 +23,15 @@ const Helpers = {
const signature_b64 = signature.toString('base64')
const header = `keyId="${config.baseurl}/federation/u/${user.username}",headers="(request-target) host date",signature="${signature_b64}"`
console.error('header ', header)
console.error('requestTo ', toInbox)
console.error('host ', toOrigin.hostname)
request({
url: toInbox,
headers: {
'Host': toOrigin.hostname,
'Date': d.toUTCString(),
'Signature': header
'Signature': header,
'Content-Type': 'application/activity+json; charset=utf-8'
},
method: 'POST',
json: true,