XF 2.0 Config.php for CDN

mcatze

Well-known member
Is there a list with all possible entries in the xf2 config.php?

I would like to use the same entries from xf1 config.php but it doesn't work..
Code:
$config['externalDataUrl'] = 'https://cdn.domain.com/data';
$config['javaScriptUrl'] = 'https://cdn.domain.com/js';
 
I think this should pretty much cover them:

Code:
$container['config.default'] = [
   'db' => [
      'adapterClass' => 'XF\Db\Mysqli\Adapter'
   ],
   'fullUnicode' => false,
   'cache' => [
      'enabled' => false,
      'sessions' => false,
      'namespace' => 'xf',
      'provider' => 'Void',
      'config' => []
   ],
   'debug' => false,
   'development' => [
      'enabled' => false,
      'defaultAddOn' => '',
      'skipAddOns' => null, // this has to be something other than an array to allow people to change it
      'throwJobErrors' => false,
      'fullJs' => false,
      'fullEditorJs' => false // internal use only, the necessary files are not distributed
   ],
   'designer' => [
      'enabled' => false,
      'basePath' => 'src' . \DIRECTORY_SEPARATOR . 'styles'
   ],
   'cookie' => [
      'prefix' => 'xf_',
      'path' => '/',
      'domain' => ''
   ],
   'http' => [
      'sslVerify' => null,
      'proxy' => null
   ],
   'globalSalt' => '....',
   'superAdmins' => '', // keep this for upgrade purposes
   'internalDataPath' => 'internal_data',
   'codeCachePath' => '%s/code_cache',
   'tempDataPath' => '%s/temp',
   'fsAdapters' => [],
   'externalDataPath' => 'data',
   'externalDataUrl' => 'data',
   'javaScriptUrl' => 'js',
   'chmodWritableValue' => 0,
   'jobMaxRunTime' => 8,
   'enableMail' => true,
   'enableMailQueue' => true,
   'enableListeners' => true,
   'enableTemplateModificationCallbacks' => true,
   'enableClickjackingProtection' => true,
   'enableReverseTabnabbingProtection' => true,
   'enableGzip' => true,
   'enableContentLength' => true,
   'enableTfa' => true,
   'enableLivePayments' => true,
   'maxImageResizePixelCount' => 20000000,
   'adminLogLength' => 60, // number of days to keep admin log entries
   'checkVersion' => true,
   'passwordIterations' => 10,
   'proxyUrlFormat' => 'proxy.php?{type}={url}&hash={hash}',
   'container' => [],
   'exists' => false
];

I think most are at least similar to xf1 versions
 
Thanks for the Overview..

I tested the externalDataUrl from xf1, but it doesn't work. In xf2 it seems that externalDataPath is the better choice.
But what is the right way for the js Path?
 
the externalDataPath/externalDataUrl might not be the best option, I think that'd be handled via the filesystem handler. Not sure, haven't really done anything with FlySystem yet

the js path would be javaScriptUrl still, I believe
 
I would like to used CDN like this addon for xf1, but also with /js and /data ..
Maybe a little suggestion for an addon from Themehouse ;) :D
 
It's me, again..

Same problem, same thread. The CDN-Path for /data is working, but the path for /js doesn't.

Does someone has the same problem with CDN in config.php?
 
Top Bottom