fix: does 'require_header' change anything?

This commit is contained in:
əlemi 2024-03-26 21:14:01 +01:00
parent 923d96bd7f
commit 98cb07b547
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -113,6 +113,9 @@ async fn deliver(key: &PKey<Private>, to: &str, from: &str, payload: serde_json:
let signature_header = Config::new() let signature_header = Config::new()
.dont_use_created_field() .dont_use_created_field()
.require_header("host")
.require_header("date")
.require_header("digest")
.begin_sign("POST", &path, headers) .begin_sign("POST", &path, headers)
.unwrap() .unwrap()
.sign(format!("{from}#main-key"), |to_sign| { .sign(format!("{from}#main-key"), |to_sign| {