[TYPO3-english] TYPO3 behind a CDN and checkValidBrowserOrDie() ("Your browser version looks incompatible with this TYPO3 version")

Jigal van Hemert jigal.van.hemert at typo3.org
Sun Dec 20 22:11:52 CET 2015


Hi,

On 17/12/2015 04:38, Michael Schams wrote:
> Some of our TYPO3 CMS sites are behind CDNs (content delivery network).
>  From a client's perspective, the CDN is the end-point and the CDN does
> not forward the user-agent string to the application server (here: the
> TYPO3 instance). In fact the CDN sends it's own string to identify that
> the request comes from the CDN, but not the user-agent from the client's
> browser.
> [1] typo3/init.php, line 55:
>
00045	->baseSetup('typo3/')
00046	->redirectToInstallerIfEssentialConfigurationDoesNotExist('../')
00047	->startOutputBuffering()
00048	->loadConfigurationAndInitialize()
00049	->loadTypo3LoadedExtAndExtLocalconf(TRUE)
00050	->applyAdditionalConfigurationSettings()
00051	->initializeTypo3DbGlobal()
00052	->checkLockedBackendAndRedirectOrDie()
> 00053:  ->checkBackendIpOrDie()
> 00054:  ->checkSslBackendAndRedirectIfNeeded()
> 00055:  ->checkValidBrowserOrDie()
> 00056:  ->loadExtensionTables(TRUE)
> 00057:  ->initializeSpriteManager()

The good news is that the browser information is detected in one of the 
sub-sub-calls inside baseSetup(). This fills 
$GLOBALS['CLIENT']['BROWSER'] with the name of the browser.

It's not until line 55 that this is checked and the request is 
terminated if the global variable doesn't contain any value.

In the mean time a lot of stuff has been loaded, among which are the 
LocalConfiguration, the AdditionalConfiguration, the loaded extensions 
and their ext_localconf.php files.
You could set the browser name in the AdditionalConfiguration file, or 
you could overwrite it in one of your extensions (for example a "site 
package" which contains all the configuration of the site).

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list