Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor: Add support for IPv6 addresses in sslip function

Andras Bacsai9a1c9124ae0a
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 8562226264..350f168370 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -505,6 +505,12 @@ function sslip(Server $server)
return "http://$baseIp.sslip.io";
}
+ // ipv6
+ if (str($server->ip)->contains(':')) {
+ $ipv6 = str($server->ip)->replace(':', '-');
+
+ return "http://{$ipv6}.sslip.io";
+ }
return "http://{$server->ip}.sslip.io";
}