Arcjet is designed to run on every request. When testing your rules,
you can use DRY_RUN mode to see how your rules would behave without actually
enforcing them. The result will be logged, but all requests will be allowed.
This is useful for testing your rules without affecting your users.
You can also write a simple sampling function to set the Arcjet rules using
withRule based on a desired sample rate. This allows you to test your rules on
a subset of your traffic.
This Next.js middleware example shows how to trigger Arcjet Shield and bot
detection rules in live mode on 10% of your traffic.