mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-29 15:01:10 +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 {
|
for inbox in boxes {
|
||||||
// TODO: run it in Sidekiq or something like that
|
// 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()
|
let res = Client::new()
|
||||||
.post(&inbox[..])
|
.post(&inbox[..])
|
||||||
.headers(request::headers())
|
.headers(headers.clone())
|
||||||
.header(request::signature(sender, request::headers()))
|
.header(request::signature(sender, headers))
|
||||||
.header(request::digest(signed.to_string()))
|
|
||||||
.body(signed.to_string())
|
.body(signed.to_string())
|
||||||
.send();
|
.send();
|
||||||
match res {
|
match res {
|
||||||
|
|
Loading…
Reference in a new issue