Allow ping with api_secret or account token
This commit is contained in:
parent
301c36809c
commit
675f899744
1 changed files with 2 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ class ApiCheck
|
|||
if ($token && $token->user) {
|
||||
Auth::onceUsingId($token->user_id);
|
||||
Session::set('token_id', $token->id);
|
||||
} elseif ($hasApiSecret && $request->is('api/v1/ping')) {
|
||||
// do nothing: allow ping with api_secret or account token
|
||||
} else {
|
||||
sleep(ERROR_DELAY);
|
||||
$error['error'] = ['message' => 'Invalid token'];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue