fix: correct server setup with proper connect info handling

Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-10 21:39:23 -03:00
parent b5b101ee35
commit 7b9d127ff0

View File

@@ -130,7 +130,6 @@ async fn run_server(
ServiceBuilder::new()
.layer(TraceLayer::new_for_http())
.layer(CorsLayer::permissive())
.layer(axum::extract::connect_info::IntoMakeServiceWithConnectInfo::into_make_service_with_connect_info::<SocketAddr>)
)
.with_state(state);
@@ -145,7 +144,10 @@ async fn run_server(
info!("Server listening on {}", addr);
let listener = tokio::net::TcpListener::bind(addr).await?;
axum::serve(listener, app).await?;
axum::serve(
listener,
app.into_make_service_with_connect_info::<SocketAddr>()
).await?;
Ok(())
}