diff --git a/src/Application/Application.php b/src/Application/Application.php index 99192aed..4bc59c83 100644 --- a/src/Application/Application.php +++ b/src/Application/Application.php @@ -369,16 +369,16 @@ public function bind(Loader $config): void { $this->config = $config; - if (is_string($config['app']['root'])) { - $this->router->setBaseRoute($config['app']['root']); - } - - // We activate the auto csrf switcher - $this->router->setAutoCsrf((bool)($config['app']['auto_csrf'] ?? false)); - $this->capsule->instance('config', $config); $this->boot(); + + // We activate the auto csrf switcher + $this->router->setAutoCsrf((bool) ($config['app']['auto_csrf'] ?? false)); + + if (is_string($config['app']['root'])) { + $this->router->setBaseRoute($config['app']['root']); + } } /**