Browse Source

Internal API can't be disabled

tags/3.1.0
Mike Koch 2 years ago
parent
commit
7fe647c3ab
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      api/index.php

+ 1
- 2
api/index.php View File

@@ -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);
}

Loading…
Cancel
Save