Skip to content

v0.2.0 — Rules Engine

Latest

Choose a tag to compare

@cport1 cport1 released this 09 Feb 05:08
· 2 commits to main since this release

What's New

Rules Engine

In-memory rules engine with first-deny-wins evaluation. Ships with two built-in rule types:

  • Rate Limiting — Fixed window and sliding window algorithms with configurable limits, windows, and actions (throttle with 429 + Retry-After, or deny with 403)
  • Filter Expressions — A declarative expression language for matching requests against IP, path, method, headers, country, ASN, and abuse score

Violation Event Reporting

Rule violations are buffered in the SDK and flushed in batches to the ingest service for dashboard visibility.

IP Enrichment

On-demand IP enrichment (GeoIP, VPN/proxy detection, AbuseIPDB) with 1-hour TTL cache and request deduplication. Powers filter expressions like ip.country == "CN" && ip.abuseScore > 80.

Framework Adapters

  • Express — Updated with rule engine integration (429/403 responses)
  • Next.js — New adapter (@webdecoy/nextjs)
  • Fastify — New adapter (@webdecoy/fastify)

Packages

Package Version
@webdecoy/node 0.2.0
@webdecoy/express 0.2.0
@webdecoy/nextjs 0.2.0
@webdecoy/fastify 0.2.0