Merge pull request #3372 from bluewave-labs/fix/ipv6-support

Fix IPv6 address handling in ping monitor (#3053)
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-03-04 13:00:15 -08:00
commit 7bfd68e374
1 file changed
+2 -1
@@ -261,7 +261,8 @@ class NetworkService implements INetworkService {
const sanitizedHost = rawUrl
.replace(/^https?:\/\//, "")
.replace(/\/.*$/, "")
.replace(/:.*/, "");
.replace(/^\[(.+)\](?::.*)?$/, "$1") // Extract IPv6 from brackets, strip port
.replace(/^([^[\]:]+):(\d+)$/, "$1"); // Strip port from IPv4/hostname only
const { response, error } = await this.timeRequest(() => this.ping.promise.probe(sanitizedHost));
if (!response) {