Support sending API secret as header
This commit is contained in:
parent
c82e8476dc
commit
b7c783aa15
1 changed files with 2 additions and 1 deletions
|
|
@ -30,7 +30,8 @@ class ApiCheck {
|
|||
$hasApiSecret = false;
|
||||
|
||||
if ($secret = env(API_SECRET)) {
|
||||
$hasApiSecret = hash_equals($request->api_secret ?: '', $secret);
|
||||
$requestSecret = Request::header('X-Ninja-Secret') ?: ($request->api_secret ?: '');
|
||||
$hasApiSecret = hash_equals($requestSecret, $secret);
|
||||
}
|
||||
|
||||
if ($loggingIn) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue