ar-io / arns-service

Koa microservice that leverages Warp to support the ArNS Portal and ar.io observers.
https://api.arns.app
GNU Affero General Public License v3.0
19 stars 4 forks source link

feat(PE-5458): blocklist contract evaluation #95

Closed dtfiedler closed 6 months ago

dtfiedler commented 6 months ago

Blocklist contract evaluation based on env vars.

Comment:

To access ctx.params we must be in a route handler, hence why we attach the blocklist middleware to routes that support contractTxId directly instead of a global middleware. Should we prefer a global middleware, we would have to parse out the contractTxId from ctx.path via regex, which has a few edge cases we may not want (e.g. the query including contractTxId for filtering which does not evaluate the contract, and instead filters out records that are assigned to that contractTxId).