From 2dccb1902f246c0be3f4a86f4fa28e4b0160e029 Mon Sep 17 00:00:00 2001 From: Sascha Nowak Date: Thu, 12 Sep 2024 21:20:14 +0200 Subject: [PATCH] fix: add url support currently we replace the given host with the cdn domain. --- Classes/ViewHelpers/StencilViewHelper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/ViewHelpers/StencilViewHelper.php b/Classes/ViewHelpers/StencilViewHelper.php index 0110d44..fb3f9c9 100644 --- a/Classes/ViewHelpers/StencilViewHelper.php +++ b/Classes/ViewHelpers/StencilViewHelper.php @@ -107,6 +107,10 @@ protected function getUrl(string $url): ?string private function getAbsoluteWebPath(string $file, bool $cacheBreaker = false): string { + if (PathUtility::hasProtocolAndScheme($file)) { + return $file; + } + if (PathUtility::isExtensionPath($file)) { $file = Environment::getPublicPath() . '/' . PathUtility::getPublicResourceWebPath($file, false); // as the path is now absolute, make it "relative" to the current script to stay compatible