ip whitelist
This commit is contained in:
+11
-1
@@ -62,7 +62,17 @@ async fn main() -> anyhow::Result<()> {
|
||||
let listener = tokio::net::TcpListener::bind(config.listen_addr)
|
||||
.await
|
||||
.context("HTTP bind failed")?;
|
||||
tracing::info!(event="application_startup",listen_addr=%config.listen_addr);
|
||||
let ip_whitelist_file = config
|
||||
.ip_whitelist_file
|
||||
.as_deref()
|
||||
.map(|path| path.display().to_string())
|
||||
.unwrap_or_else(|| "disabled".into());
|
||||
tracing::info!(
|
||||
event = "application_startup",
|
||||
listen_addr = %config.listen_addr,
|
||||
trust_proxy = config.trust_proxy,
|
||||
ip_whitelist_file
|
||||
);
|
||||
axum::serve(
|
||||
listener,
|
||||
http::router(state).into_make_service_with_connect_info::<std::net::SocketAddr>(),
|
||||
|
||||
Reference in New Issue
Block a user