Check install before adding CORS as currently throw Exception

This commit is contained in:
Benoît Burnichon
2015-11-20 19:48:06 +01:00
parent ee77ce11e0
commit bbb8255b5d

View File

@@ -350,7 +350,9 @@ class Application extends SilexApplication
return new DefaultProvider($paths, []); return new DefaultProvider($paths, []);
}; };
$this['alchemy_cors.options_providers'][] = 'phraseanet.api_cors.options_provider'; if ($this['phraseanet.configuration-tester']->isInstalled()) {
$this['alchemy_cors.options_providers'][] = 'phraseanet.api_cors.options_provider';
}
// allow access to oauth service from standard application scope // allow access to oauth service from standard application scope
$this->register(new V1()); $this->register(new V1());