Skip to content

Commit 84295a0

Browse files
committed
feat: ip in config for gateway
1 parent fbeb4d7 commit 84295a0

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

aggregation_mode/gateway/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
44

55
#[derive(Clone, Debug, Deserialize, Serialize)]
66
pub struct Config {
7+
pub ip: String,
78
pub port: u16,
89
pub db_connection_url: String,
910
pub network: String,

aggregation_mode/gateway/src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl GatewayServer {
5959
.route("/proof/risc0", web::post().to(Self::post_proof_risc0))
6060
.route("/quotas/{address}", web::get().to(Self::get_quotas))
6161
})
62-
.bind(("127.0.0.1", port))
62+
.bind((self.config.ip.as_str(), port))
6363
.expect("To bind socket correctly")
6464
.run()
6565
.await

config-files/config-agg-mode-gateway-ethereum-package.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ip: "127.0.0.1"
12
port: 8089
23
db_connection_url: "postgres://postgres:postgres@localhost:5435/"
34
eth_rpc_url: "http://localhost:8545"

config-files/config-agg-mode-gateway.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ip: "127.0.0.1"
12
port: 8089
23
db_connection_url: "postgres://postgres:postgres@localhost:5435/"
34
eth_rpc_url: "http://localhost:8545"

0 commit comments

Comments
 (0)