Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nexus/src/app/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ impl<'a> ReceiverClient<'a> {
HeaderName::from_static("x-oxide-alert-class");
const HDR_SIG: HeaderName =
HeaderName::from_static("x-oxide-signature");
const HDR_TIMESTAMP: HeaderName =
HeaderName::from_static("x-oxide-timestamp");

#[derive(serde::Serialize, Debug)]
struct Payload<'a> {
Expand Down Expand Up @@ -459,6 +461,7 @@ impl<'a> ReceiverClient<'a> {
.header(HDR_DELIVERY_ID, delivery.id.to_string())
.header(HDR_ALERT_ID, delivery.alert_id.to_string())
.header(HDR_ALERT_CLASS, alert_class.to_string())
.header(HDR_TIMESTAMP, &sent_at)
.header(http::header::CONTENT_TYPE, "application/json");

// For each secret assigned to this webhook, calculate the HMAC and add a signature header.
Expand Down
Loading