Table of Contents
Configuration on server
if [approot]/public_html/ copy inc_config.php.dist to inc_config.php.dist. set a secret behind key apikey.
It means: this is a shared secret between this server and all your application servers.
It is not realized yet to use a secret per application.
$approot=dirname(__DIR__);
return array(
// define a secret aka api key
'apikey'=>'our-package-server-secret',
// packages to deliver where files from ci server are synched
'packagedir'=>$approot.'/packages',
// max age of request ... client and server need to be in sync
'maxage'=>60,
// force that a hash can be used only once
'onetimesecret'=>true,
// filesize of lock file with stored hashed before starting garbage collection
// 10.000 byte are reached after 114 req
'maxlockfilesize'=>10000,
// tmp dir to store used hashes
'tmpdir'=>$approot.'/tmp',
// allow directory listing when accessing a path of a package
// true is required to fetch all packages
'showdircontent'=>true,
// Enable for troubleshooting
'debug'=>false,
);
Key | Description |
---|---|
apikey | A secret for the server. A client that wants to fetch a package must use the same secret |
packagedir | physical folder where to find the packages. To this folder you need to point XSendFilePath in your apache httpd vhost too. |
maxage | max age of request … client and server need to be in sync |
onetimesecret | force that a hash can be used only once. There should be no reason to turn it off. |
maxlockfilesize | filesize of lock file with stored hashed before starting garbage collection. 10.000 byte are reached after 114 req |
tmpdir | tmp dir to store used hashes |
showdircontent | allow directory listing when accessing a path of a package. true is required to fetch all packages by a single request |
debug | enable debug output |