Skip to content

Commit 9a1c912

Browse files
committed
refactor: Add support for IPv6 addresses in sslip function
1 parent 306c4dc commit 9a1c912

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bootstrap/helpers/shared.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,12 @@ function sslip(Server $server)
505505

506506
return "http://$baseIp.sslip.io";
507507
}
508+
// ipv6
509+
if (str($server->ip)->contains(':')) {
510+
$ipv6 = str($server->ip)->replace(':', '-');
511+
512+
return "http://{$ipv6}.sslip.io";
513+
}
508514

509515
return "http://{$server->ip}.sslip.io";
510516
}

0 commit comments

Comments
 (0)