pub async fn ab_testing_middleware(req: Request, next: Next) -> Response<Body>Expand description
A/B testing middleware
This middleware:
- Checks if there’s an A/B test configured for the request endpoint
- Selects a variant based on the test configuration
- Applies the variant response (status code, headers, body)
- Records analytics for the selected variant