diff --git a/Classes/XClass/ResourceLocalDriver.php b/Classes/XClass/ResourceLocalDriver.php index 18b4ace1..5caf183b 100644 --- a/Classes/XClass/ResourceLocalDriver.php +++ b/Classes/XClass/ResourceLocalDriver.php @@ -53,10 +53,12 @@ protected function determineBaseUrl(): void }; if ($basePath !== '') { - $frontendUri = (new Uri($urlUtility->getFrontendUrl())); + $frontendUri = new Uri($urlUtility->getFrontendUrl()); + $proxyUri = new Uri($urlUtility->getProxyUrl()); + $baseUri = new Uri($basePath); - $path = new Uri(trim($basePath, '/')); - $this->configuration['baseUri'] = (string)$frontendUri->withPath('/' . trim((new Uri($urlUtility->getProxyUrl()))->getPath(), '/') . '/' . trim($path->getPath(), '/')); + $path = trim($proxyUri->getPath(), '/') . '/' . trim($baseUri->getPath(), '/'); + $this->configuration['baseUri'] = (string)$frontendUri->withPath('/' . trim($path, '/')); } else { $this->configuration['baseUri'] = $urlUtility->getStorageProxyUrl(); }