diff --git a/app/Helpers/Functions.php b/app/Helpers/Functions.php index 8f8b804fd..eede45ba8 100644 --- a/app/Helpers/Functions.php +++ b/app/Helpers/Functions.php @@ -59,6 +59,9 @@ function source_base_url(string $path = ''): string if (isset($parsedUrl['port'])) { $baseUrl .= ':' . $parsedUrl['port']; } + if (isset($parsedUrl['path']) && $parsedUrl['path'] !== '/') { + $baseUrl .= rtrim($parsedUrl['path'], '/'); + } } }