From aa9063e60e69f4210ebcd9ec7c066b8eff6f09e7 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Sun, 17 Nov 2024 13:50:11 +1300 Subject: [PATCH] minor: management auth --- src/web/management/auth.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/management/auth.rs b/src/web/management/auth.rs index 100d1c9..d33932b 100644 --- a/src/web/management/auth.rs +++ b/src/web/management/auth.rs @@ -1,6 +1,7 @@ use crate::error::{ChorusError, Error}; use crate::globals::GLOBALS; use base64::prelude::*; +use http::header::AUTHORIZATION; use http_body_util::BodyExt; use hyper::body::Incoming; use hyper::Request; @@ -19,7 +20,7 @@ pub async fn check_auth(request: Request) -> Result { } // Must have AUTHORIZATION header - let authz = match request.headers().get("Authorization") { + let authz = match request.headers().get(AUTHORIZATION) { Some(h) => h, None => return s_err("Authorization header not of type nostr"), };