mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 10:20:32 +00:00
fix: add ConnectInfo for rate limiter IP extraction
PeerIpKeyExtractor requires SocketAddr from ConnectInfo to extract client IP. Without this, rate limiting fails with "Unable To Extract Key!" error in Docker containers.
This commit is contained in:
@@ -268,10 +268,13 @@ async fn run_server(config: Config, storage: Storage) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Graceful shutdown on SIGTERM/SIGINT
|
// Graceful shutdown on SIGTERM/SIGINT
|
||||||
axum::serve(listener, app)
|
axum::serve(
|
||||||
.with_graceful_shutdown(shutdown_signal())
|
listener,
|
||||||
.await
|
app.into_make_service_with_connect_info::<std::net::SocketAddr>(),
|
||||||
.expect("Server error");
|
)
|
||||||
|
.with_graceful_shutdown(shutdown_signal())
|
||||||
|
.await
|
||||||
|
.expect("Server error");
|
||||||
|
|
||||||
info!(
|
info!(
|
||||||
uptime_seconds = state.start_time.elapsed().as_secs(),
|
uptime_seconds = state.start_time.elapsed().as_secs(),
|
||||||
|
|||||||
Reference in New Issue
Block a user