diff --git a/api/index.php b/api/index.php index 6ec11b83..4b0e6e6e 100644 --- a/api/index.php +++ b/api/index.php @@ -16,13 +16,12 @@ function handle404() { } function before() { - assertApiIsEnabled(); - $internalUse = \BusinessLogic\Helpers::getHeader('X-INTERNAL-CALL'); if ($internalUse === 'true') { buildUserContextFromSession(); } else { + assertApiIsEnabled(); $token = \BusinessLogic\Helpers::getHeader('X-AUTH-TOKEN'); buildUserContext($token); }