mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 05:21:00 +00:00
Add content digest to signed http headers
Sign the Digest HTTP header
This commit is contained in:
parent
fceb9ab0cd
commit
eafe1ed490
1 changed files with 4 additions and 3 deletions
|
@ -104,11 +104,12 @@ pub fn broadcast<S: sign::Signer, A: Activity, T: inbox::WithInbox + Actor>(send
|
|||
|
||||
for inbox in boxes {
|
||||
// TODO: run it in Sidekiq or something like that
|
||||
let mut headers = request::headers();
|
||||
headers.set(request::digest(signed.to_string()));
|
||||
let res = Client::new()
|
||||
.post(&inbox[..])
|
||||
.headers(request::headers())
|
||||
.header(request::signature(sender, request::headers()))
|
||||
.header(request::digest(signed.to_string()))
|
||||
.headers(headers.clone())
|
||||
.header(request::signature(sender, headers))
|
||||
.body(signed.to_string())
|
||||
.send();
|
||||
match res {
|
||||
|
|
Loading…
Reference in a new issue