mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
log client/remote IP address on various routes tracing calls
this uses InsecureClientIp as this is purely for informational and logging purposes Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
1 parent
74b29ce067
commit
f1d90e5df6
8 files changed
+59
-31
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use std::{collections::BTreeMap, sync::Arc, time::Instant};
|
||||
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduit::debug_warn;
|
||||
use ruma::{
|
||||
api::{
|
||||
@@ -25,8 +26,9 @@ use crate::{
|
||||
/// # `PUT /_matrix/federation/v1/send/{txnId}`
|
||||
///
|
||||
/// Push EDUs and PDUs to this server.
|
||||
#[tracing::instrument(skip_all, fields(%client_ip))]
|
||||
pub(crate) async fn send_transaction_message_route(
|
||||
body: Ruma<send_transaction_message::v1::Request>,
|
||||
InsecureClientIp(client_ip): InsecureClientIp, body: Ruma<send_transaction_message::v1::Request>,
|
||||
) -> Result<send_transaction_message::v1::Response> {
|
||||
let origin = body.origin.as_ref().expect("server is authenticated");
|
||||
|
||||
|
||||
Reference in new issue
Block a user