[BUGFIX] Use scheme from EnvironmentVariables for forceAbsoluteUrl 83/50683/2
authorFrans Saris <franssaris@gmail.com>
Tue, 15 Nov 2016 11:46:57 +0000 (12:46 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 16 Nov 2016 21:02:08 +0000 (22:02 +0100)
Resolves: #78699
Releases: master, 7.6
Change-Id: If238a92e20f2382ad3b37a231992a122eff80826
Reviewed-on: https://review.typo3.org/50683
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
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