Skip to content

Commit 9b6691a

Browse files
authored
fix ipv6 notation (#1084)
On Mac OS, when localhost:8080 is defined and sqlpage config file, the SocketAddr is resolved with ipv6 address if ip V6 is available on the internal network. ```json { "listen_on": "localhost:8080" } ``` On the terminal we can Ctrl + Click, but the URL is incorrect (ipV6 notation use bracket) Actually we have ```shell View your website at: 🔗 http://::1:8080 ``` Instead of ``` View your website at: 🔗 http://[::1]:8080 ``` Regards,
1 parent 0d0bd84 commit 9b6691a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/webserver/http.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ fn log_welcome_message(config: &AppConfig) {
547547
"http://localhost:{port}\n\
548548
(also accessible from other devices using your IP address)"
549549
)
550+
} else if ip.is_ipv6() {
551+
format!("http://[{ip}]:{port}")
550552
} else {
551553
format!("http://{ip}:{port}")
552554
}

0 commit comments

Comments
 (0)