[BUGFIX] Use current domain if found in domain record
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / ContentObjectRenderer.php
index be490f8..259645a 100644 (file)
@@ -6296,7 +6296,7 @@ class ContentObjectRenderer {
 
                                                        $targetDomain = $GLOBALS['TSFE']->getDomainNameForPid($page['uid']);
                                                        // Do not prepend the domain if it is the current hostname
-                                                       if (!$targetDomain || $targetDomain === $currentDomain) {
+                                                       if (!$targetDomain || $GLOBALS['TSFE']->domainNameMatchesCurrentRequest($targetDomain)) {
                                                                $targetDomain = '';
                                                        }
                                                }