Log forbidden
This commit is contained in:
@ -46,6 +46,9 @@ class API
|
|||||||
if ($this->validate($request, $key)) {
|
if ($this->validate($request, $key)) {
|
||||||
return $handler->handle($request);
|
return $handler->handle($request);
|
||||||
}
|
}
|
||||||
|
$this->logger->warning("Forbidden.", [
|
||||||
|
'headers' => $request->getHeaders()
|
||||||
|
]);
|
||||||
return $this->responseFactory->createResponse(403);
|
return $this->responseFactory->createResponse(403);
|
||||||
}
|
}
|
||||||
protected function validate(ServerRequestInterface $request, $incoming_key): bool
|
protected function validate(ServerRequestInterface $request, $incoming_key): bool
|
||||||
|
Reference in New Issue
Block a user