Skip to content

Commit 2c48111

Browse files
committed
chore(proxy): added ogmios dns
1 parent 7b25d29 commit 2c48111

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

proxy/src/config.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub struct Config {
88
pub proxy_tiers_poll_interval: Duration,
99
pub prometheus_addr: String,
1010
pub ogmios_port: u16,
11+
pub ogmios_dns: String,
1112
pub ssl_crt_path: PathBuf,
1213
pub ssl_key_path: PathBuf,
1314
}
@@ -39,6 +40,7 @@ impl Config {
3940
.expect("OGMIOS_PORT must be set")
4041
.parse()
4142
.expect("OGMIOS_PORT must a number"),
43+
ogmios_dns: env::var("OGMIOS_DNS").expect("OGMIOS_DNS must be set"),
4244
}
4345
}
4446
}

proxy/src/proxy.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ impl ProxyRequest {
281281
let network = captures.get(2)?.as_str().to_string();
282282
let version = captures.get(3)?.as_str().to_string();
283283

284-
let instance = format!("ogmios-{network}-{version}:{}", state.config.ogmios_port);
284+
let instance = format!(
285+
"ogmios-{network}-{version}.{}:{}",
286+
state.config.ogmios_dns, state.config.ogmios_port
287+
);
288+
285289
let namespace = state.config.proxy_namespace.clone();
286290

287291
let protocol = get_header(hyper_req, UPGRADE.as_str())

0 commit comments

Comments
 (0)