Release 0.5.2
Test / test (push) Successful in 57s
Publish release / publish (push) Successful in 3m1s

This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-28 18:09:28 +02:00
parent 6ee6551400
commit 45240b7cab
4 changed files with 17 additions and 3 deletions
+11 -1
View File
@@ -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(())
}