Skip to content

Commit

Permalink
listen on all ipv4 and ipv6 interfaces by default (#22)
Browse files Browse the repository at this point in the history
connectors started using ndc sdk currently only listens on ipv4
interfaces alone. this pr changes the default value to
`net::IpAddr::V6(net::Ipv6Addr::UNSPECIFIED)` which translates to `::`
which would then make the server listen on all ipv4 and ipv6 interfaces
  • Loading branch information
shahidhk committed Jul 30, 2024
1 parent 83a906e commit 9120a82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/sdk/src/default_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ struct ServeCommand {
long,
value_name = "HOST IP",
env = "HASURA_CONNECTOR_HOST",
default_value_t = net::IpAddr::V4(net::Ipv4Addr::UNSPECIFIED),
// listen on "::" defaulting to all IPv4 and IPv6 addresses
default_value_t = net::IpAddr::V6(net::Ipv6Addr::UNSPECIFIED),
)]
host: net::IpAddr,
#[arg(
Expand Down

0 comments on commit 9120a82

Please # to comment.