arcjet-js icon indicating copy to clipboard operation
arcjet-js copied to clipboard

Explore deduplication of rules

Open blaine-arcjet opened this issue 10 months ago • 2 comments

We should explore deduplication of rules within the same client. This seems especially complex in the situation where the SDK is used in middleware & handlers. For example, how would we know to avoid the middleware protect() call so all rules were sent by the handle protect() call?

blaine-arcjet avatar Apr 16 '24 21:04 blaine-arcjet

Could this also deduplicate calls to the API? The question seems to be at what stage of the execution flow do we get full visibility of the configured rules? Middleware needs to execute first - that's the whole point of it - before then allowing the rest of the code to execute.

davidmytton avatar Apr 22 '24 13:04 davidmytton

/assign @Ayush9026 i will try to solve this issue.

Ayush9026 avatar Apr 28 '24 14:04 Ayush9026