Typo3 RTE and Reverse Proxy
by
Herbert Straub
—
last modified
2009-04-10 00:35
—
filed under:
BugOpen
Typo3 in Reverse proxy configuration
Rich Text Editor
fails in Reverse Proxy Configuration, because the TYPO3_REQUEST_HOST is the local Apache and not the HTTP_X_FORWARDED_HOST.
Workaround
This patch works for me:
--- orig/typo3_src-4.2.6/t3lib/class.t3lib_div.php 2009-02-10 10:36:26.000000000 +0100
+++ ./typo3_src-4.2.6/t3lib/class.t3lib_div.php 2009-04-10 01:05:38.605843399 +0200
@@ -3506,6 +3506,8 @@
$retVal = $ip;
}
}
+ # Straub
+ $retVal = $_SERVER['HTTP_X_FORWARDED_HOST'];
break;
case 'HTTP_HOST':
$retVal = $_SERVER['HTTP_HOST'];
@@ -3566,7 +3568,9 @@
break;
case 'TYPO3_REQUEST_HOST':
$retVal = (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').
- t3lib_div::getIndpEnv('HTTP_HOST');
+ # Straub
+ #t3lib_div::getIndpEnv('HTTP_HOST');
+ $_SERVER['HTTP_X_FORWARDED_HOST'];
break;
case 'TYPO3_REQUEST_URL':
$retVal = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').t3lib_div::getIndpEnv('REQUEST_URI');

Previous:
CentOS 5.3 Marvell 88E8056 Network starting problems
