ab_testing_middleware

Function ab_testing_middleware 

Source
pub async fn ab_testing_middleware(req: Request, next: Next) -> Response<Body>
Expand description

A/B testing middleware

This middleware:

  1. Checks if there’s an A/B test configured for the request endpoint
  2. Selects a variant based on the test configuration
  3. Applies the variant response (status code, headers, body)
  4. Records analytics for the selected variant