[pve-devel] [PATCH proxmox 2/2] notify: gotify: use constant from http crate for 'Authorization' header
Lukas Wagner
l.wagner at proxmox.com
Fri Mar 21 10:57:00 CET 2025
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
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()),
--
2.39.5
More information about the pve-devel
mailing list