From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox 2/2] notify: gotify: use constant from http crate for 'Authorization' header
Date: Fri, 21 Mar 2025 10:57:00 +0100 [thread overview]
Message-ID: <20250321095700.106077-2-l.wagner@proxmox.com> (raw)
In-Reply-To: <20250321095700.106077-1-l.wagner@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-21 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 9:56 [pve-devel] [PATCH proxmox 1/2] notify: webhook: gotify: set Content-Length header Lukas Wagner
2025-03-21 9:57 ` Lukas Wagner [this message]
2025-03-25 18:41 ` [pve-devel] applied: " Thomas Lamprecht
2025-03-26 9:54 ` Lukas Wagner
2025-03-26 10:11 ` Thomas Lamprecht
2025-03-26 10:20 ` Lukas Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250321095700.106077-2-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal