• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Config.php for CDN

mcatze

Well-known member
#1
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';
 

Jake B.

Well-known member
#2
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
 

mcatze

Well-known member
#3
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?
 

Jake B.

Well-known member
#4
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