Skip to content

Commit

Permalink
fix: status code when in denylist (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Jun 2, 2023
1 parent 08e64c1 commit 35c0123
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/edge-gateway/src/utils/verification.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global Response */

import {
ACCEPTABLE_CID_VERIFIER_STATUS_CODES,
ACCEPTABLE_DENYLIST_STATUS_CODES
Expand All @@ -16,7 +18,7 @@ export async function getCidForbiddenResponse (cid, env) {
])

if (!ACCEPTABLE_DENYLIST_STATUS_CODES.includes(cidDenylistResponse.status)) {
return cidDenylistResponse
return new Response('', { status: 410 })
}

// cidVerifierResponse will be null if env.isCidVerifierEnabled is false.
Expand Down

0 comments on commit 35c0123

Please sign in to comment.