diff --git a/.gitignore b/.gitignore index f4c368b..2cd8229 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.gitattributes +**/.DS_Store # Generated by Cargo # will have compiled files and executables diff --git a/auth/auth-server/src/server/api_auth.rs b/auth/auth-server/src/server/api_auth.rs index 529d544..adbb09c 100644 --- a/auth/auth-server/src/server/api_auth.rs +++ b/auth/auth-server/src/server/api_auth.rs @@ -27,12 +27,12 @@ impl Server { pub(crate) async fn authorize_request( &self, path: &str, - headers: &mut HeaderMap, + headers: &HeaderMap, body: &[u8], ) -> Result<(), ApiError> { // Check API auth let api_key = headers - .remove(RENEGADE_API_KEY_HEADER) + .get(RENEGADE_API_KEY_HEADER) .and_then(|h| h.to_str().ok().map(String::from)) // Convert to String .and_then(|s| Uuid::parse_str(&s).ok()) // Use &s to parse .ok_or(AuthServerError::unauthorized("Invalid or missing Renegade API key"))?; diff --git a/auth/auth-server/src/server/handle_external_match.rs b/auth/auth-server/src/server/handle_external_match.rs index 03a221f..69d4d5e 100644 --- a/auth/auth-server/src/server/handle_external_match.rs +++ b/auth/auth-server/src/server/handle_external_match.rs @@ -15,11 +15,11 @@ impl Server { pub async fn handle_external_match_request( &self, path: warp::path::FullPath, - mut headers: warp::hyper::HeaderMap, + headers: warp::hyper::HeaderMap, body: Bytes, ) -> Result { // Authorize the request - self.authorize_request(path.as_str(), &mut headers, &body).await?; + self.authorize_request(path.as_str(), &headers, &body).await?; // Send the request to the relayer let resp = self.send_admin_request(Method::POST, path.as_str(), headers, body).await?;