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.

fix

Andras Bacsai70fa57d8c2bc
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index a8041da783..3001b24b11 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -87,10 +87,13 @@ function base_url()
$settings = InstanceSettings::get();
if ($settings->fqdn) {
return $settings->fqdn;
- } else {
- if (config('app.env') === 'local') {
- return url('/') . ':8080';
- }
- return url('/');
}
+ $port = config('app.port');
+ if ($settings->public_ipv4) {
+ return "http://{$settings->public_ipv4}:{$port}";
+ }
+ if ($settings->public_ipv6) {
+ return "http://{$settings->public_ipv6}:{$port}";
+ }
+ return url('/');
}