diff options
Diffstat (limited to 'ocs/v1.php')
-rw-r--r-- | ocs/v1.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ocs/v1.php b/ocs/v1.php index e5138576584..3f165009f4b 100644 --- a/ocs/v1.php +++ b/ocs/v1.php @@ -51,13 +51,16 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException; try { OC_App::loadApps(['session']); OC_App::loadApps(['authentication']); - if (!\OC::$server->getUserSession()->isLoggedIn()) { - OC::handleLogin(\OC::$server->getRequest()); - } // load all apps to get all api routes properly setup + // FIXME: this should ideally appear after handleLogin but will cause + // side effects in existing apps OC_App::loadApps(); + if (!\OC::$server->getUserSession()->isLoggedIn()) { + OC::handleLogin(\OC::$server->getRequest()); + } + OC::$server->get(\OC\Route\Router::class)->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo()); } catch (ResourceNotFoundException $e) { OC_API::setContentType(); |