Skip to content

Commit

Permalink
fix: listen on configured port (#264)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brayniac authored May 13, 2024
1 parent cf61700 commit 30f3751
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exposition/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ use warp::Filter;

/// HTTP exposition
pub async fn http(config: Arc<Config>) {
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;
}
}

Expand Down

0 comments on commit 30f3751

Please sign in to comment.