add basic authentication with user, password and api key
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ if (strpos($request->path(), '/api/') === 0) {
|
||||
$authenticator->authenticate($request);
|
||||
} catch (\Throwable $e) {
|
||||
$logger->warning('External API auth failed', ['path' => $request->path(), 'error' => $e->getMessage()]);
|
||||
$response->json(['error' => 'Unauthorized'], 401);
|
||||
$response->unauthorized();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user