arcjet-js
arcjet-js copied to clipboard
Explore deduplication of rules
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?
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.
/assign @Ayush9026 i will try to solve this issue.