This commit is contained in:
Andras Bacsai 2023-06-14 09:05:13 +02:00
parent 4df928a660
commit 70fa57d8c2

View File

@ -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('/');
}