mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-01-17 14:18:19 +01:00
Get global vars via getenv
This commit is contained in:
parent
8bbfa1d367
commit
fdeb010831
@ -65,12 +65,14 @@ class Server {
|
||||
$this->config = $GLOBALS['config'];
|
||||
|
||||
//Get config from enviroment
|
||||
if(isset($_ENV['serverTitle'])){
|
||||
$this->config['serverTitle'] = $_ENV['serverTitle'];
|
||||
$envServerTitle = getenv('serverTitle');
|
||||
if($envServerTitle !== FALSE){
|
||||
$this->config['serverTitle'] = $envServerTitle;
|
||||
}
|
||||
if(isset($_ENV['baseUrls'])){
|
||||
$this->config['baseUrls'] = is_array($_ENV['baseUrls']) ?
|
||||
$_ENV['baseUrls'] : explode(',', $_ENV['baseUrls']);
|
||||
$envBaseUrls = getenv('baseUrls');
|
||||
if($envBaseUrls !== FALSE){
|
||||
$this->config['baseUrls'] = is_array($envBaseUrls) ?
|
||||
$envBaseUrls : explode(',', $envBaseUrls);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user