From a971f13d1b18cad8f37ab91c65e3aa22aaf29a6e Mon Sep 17 00:00:00 2001 From: Brian Martin Date: Mon, 13 May 2024 10:03:59 -0700 Subject: [PATCH] fix: listen on configured port The http exposition code wasn't using the configured listen address and instead was hardcoded to the default port. Fixes the initialization of the http server. --- src/exposition/http.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exposition/http.rs b/src/exposition/http.rs index 508f6dad..d10e459f 100644 --- a/src/exposition/http.rs +++ b/src/exposition/http.rs @@ -6,14 +6,14 @@ use warp::Filter; /// HTTP exposition pub async fn http(config: Arc) { + let listen = config.general().listen(); + if config.general().compression() { warp::serve(filters::http(config).with(warp::filters::compression::gzip())) - .run(([0, 0, 0, 0], 4242)) + .run(listen) .await; } else { - warp::serve(filters::http(config)) - .run(([0, 0, 0, 0], 4242)) - .await; + warp::serve(filters::http(config)).run(listen).await; } }