From 4097d3697d9f52662f8225d2b44653e72f985e10 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Fri, 21 Mar 2025 10:57:00 +0100 Subject: [PATCH] notify: gotify: use constant from http crate for 'Authorization' header Signed-off-by: Lukas Wagner --- proxmox-notify/Cargo.toml | 2 +- proxmox-notify/src/endpoints/gotify.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-notify/Cargo.toml b/proxmox-notify/Cargo.toml index ddbaacd7..5a54c4a1 100644 --- a/proxmox-notify/Cargo.toml +++ b/proxmox-notify/Cargo.toml @@ -41,7 +41,7 @@ proxmox-uuid = { workspace = true, features = ["serde"] } default = ["sendmail", "gotify", "smtp", "webhook"] mail-forwarder = ["dep:mail-parser", "dep:proxmox-sys", "proxmox-sendmail/mail-forwarder"] sendmail = ["dep:proxmox-sys", "dep:base64", "dep:proxmox-sendmail"] -gotify = ["dep:proxmox-http"] +gotify = ["dep:proxmox-http", "dep:http"] pve-context = ["dep:proxmox-sys"] pbs-context = ["dep:proxmox-sys"] smtp = ["dep:lettre"] diff --git a/proxmox-notify/src/endpoints/gotify.rs b/proxmox-notify/src/endpoints/gotify.rs index e154daab..3e12a60e 100644 --- a/proxmox-notify/src/endpoints/gotify.rs +++ b/proxmox-notify/src/endpoints/gotify.rs @@ -132,7 +132,7 @@ impl Endpoint for GotifyEndpoint { .map_err(|err| Error::NotifyFailed(self.name().to_string(), err.into()))?; let extra_headers = HashMap::from([ ( - "Authorization".into(), + http::header::AUTHORIZATION.to_string(), format!("Bearer {}", self.private_config.token), ), ("X-Gotify-Key".into(), self.private_config.token.clone()),