notify: gotify: use constant from http crate for 'Authorization' header

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
Lukas Wagner 2025-03-21 10:57:00 +01:00 committed by Thomas Lamprecht
parent 6d4c115f05
commit 4097d3697d
2 changed files with 2 additions and 2 deletions

View File

@ -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"]

View File

@ -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()),