We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e598eef commit 93af870Copy full SHA for 93af870
crates/rustapi-core/src/app.rs
@@ -1115,7 +1115,11 @@ impl RustApi {
1115
.ok_or("HTTP/3 config not set. Use .with_http3(...)")?;
1116
1117
let http_socket: std::net::SocketAddr = http_addr.parse()?;
1118
- config.bind_addr = http_socket.ip().to_string();
+ config.bind_addr = if http_socket.ip().is_ipv6() {
1119
+ format!("[{}]", http_socket.ip())
1120
+ } else {
1121
+ http_socket.ip().to_string()
1122
+ };
1123
config.port = http_socket.port();
1124
let http_addr = http_socket.to_string();
1125
0 commit comments