[BUGFIX] Use scheme from EnvironmentVariables for forceAbsoluteUrl
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / ContentObjectRenderer.php
index 6878353..d4503fd 100644 (file)
@@ -6874,7 +6874,7 @@ class ContentObjectRenderer
             $isUrlModified = false;
             // Set scheme and host if not yet part of the URL:
             if (empty($urlParts['host'])) {
-                $urlParts['scheme'] = 'http';
+                $urlParts['scheme'] = $this->getEnvironmentVariable('TYPO3_SSL') ? 'https' : 'http';
                 $urlParts['host'] = $this->getEnvironmentVariable('HTTP_HOST');
                 $urlParts['path'] = '/' . ltrim($urlParts['path'], '/');
                 // absRefPrefix has been prepended to $url beforehand