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

Michael Schams typo3.lists at 2015.trash.schams.net
Tue Dec 22 13:01:07 CET 2015


Hi,

Forcing the value in AdditionalConfiguration.php or by my own extension
are great ideas. I will test this approach - thanks for the suggestion.

Nevertheless I wonder what the purpose of the browser check for the BE
is? :-) I mean, we are not testing against a specific version, but only
against a string such as "IE". If someone tries to access the BE of 7.6
with IE6, he passes the test (but we dropped the support for IE6 a long
time ago). If someone tries to access the BE with an up-to-date browser
and the TYPO3 instance is behind a proxy (e.g. a CDN), the test likely
fails. So what's the point of checkValidBrowserOrDie()?


Cheers
Michael

On Sun, 2015-12-20 at 22:11 +0100, Jigal van Hemert wrote:
> 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).
> 




More information about the TYPO3-english mailing list