diff options
Diffstat (limited to 'ocs/v1.php')
-rw-r--r-- | ocs/v1.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ocs/v1.php b/ocs/v1.php index ab0dc80f4ba..4580221e600 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -22,5 +22,13 @@ */ require_once('../lib/base.php'); -@ob_clean(); -OC_OCS::handle(); +use Symfony\Component\Routing\Exception\ResourceNotFoundException; + +OC::$router->useCollection('ocs'); +OC::$router->loadRoutes(); + +try { + OC::$router->match($_SERVER['PATH_INFO']); +} catch (ResourceNotFoundException $e) { + OC_OCS::notFound(); +} |