diff --git a/Config/bootstrap.php b/Config/bootstrap.php index 532436e5..f6d6f8ba 100644 --- a/Config/bootstrap.php +++ b/Config/bootstrap.php @@ -27,13 +27,16 @@ // Load application configurations $conf = array(); -$files = array('application.yml', 'application.local.yml'); +$files = array('application.yml', + 'application.local.yml', + 'application.' . env('HTTP_HOST') . '.yml', + 'application.' . env('HTTP_X_FORWARDED_HOST') . '.yml'); foreach ($files as $file) { if (file_exists(APP . 'Config' . DS . $file)) { - $conf = array_merge($conf, Spyc::YAMLLoad(APP . 'Config' . DS . $file)); - Configure::write($conf); + $conf = array_replace_recursive($conf, Spyc::YAMLLoad(APP . 'Config' . DS . $file)); } } +Configure::write($conf); // Load all plugins $plugins = App::objects('plugins');