Release 0.5.2
This commit is contained in:
+11
-1
@@ -278,7 +278,17 @@ async fn main() -> anyhow::Result<()> {
|
||||
|
||||
tracing::info!("listening on http://{addr}");
|
||||
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
||||
axum::serve(listener, app.into_make_service()).await?;
|
||||
// With connect info, not without: the rate limiter reads the
|
||||
// caller from `X-Forwarded-For`/`X-Real-IP` and falls back to the
|
||||
// socket, and without this there is no socket to fall back to. A
|
||||
// request that arrives without those headers - a health check on
|
||||
// localhost, anything not through Caddy - then has no key at all,
|
||||
// and the limiter answers 500 to every one of them.
|
||||
axum::serve(
|
||||
listener,
|
||||
app.into_make_service_with_connect_info::<std::net::SocketAddr>(),
|
||||
)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user