Skip to content

Commit f4f93ed

Browse files
committed
fix(ocm): Correctly track OCM requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 27f1bb1 commit f4f93ed

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/cloud_federation_api/lib/Controller/OCMRequestController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ public function manageOCMRequests(string $ocmPath): Response {
6262
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
6363
} catch (IncomingRequestException $e) {
6464
$this->logger->warning('incoming ocm request exception', ['exception' => $e]);
65-
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
65+
$response = new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
66+
$response->throttle();
67+
return $response;
6668
}
6769

6870
// assuming that ocm request contains a json array

0 commit comments

Comments
 (0)