arcjet / arcjet-js

Arcjet JS SDKs. Rate limiting, bot protection, email verification & attack defense for Node.js, Next.js, Bun & SvelteKit.
https://arcjet.com
Apache License 2.0
182 stars 3 forks source link

feat: Allow characteristics to be specified on the SDK for fingerprint generation & propagate to rate limit rule #1016

Closed e-moran closed 3 weeks ago

e-moran commented 4 weeks ago

Adds support for the generation of v2 fingerprints in the JS SDKs. V2 fingerprints can be customised to include any characteristics from the request in to the hashed payload so that they can align with rate limit characteristics.

This PR also adds functionality to default the characteristics of a rate limit rule to those of the base arcjet object if they're not explicitly set in the rule.

Resolves #1015

trunk-io[bot] commented 4 weeks ago

😎 Merged successfully - details.

davidmytton commented 3 weeks ago

This PR will conflict with #1009. I don't mind if we re-do #1009 after this is merged or the other way around.