Seeking help from ActixWeb middleware

Use Middleware to globally intercept access,
Point UA containing xxxx to another website.
Access that is not included will not be intercepted.

fn call(&self, req: ServiceRequest) -> Self::Future {
        println!("Hi from start. You requested: {}", req.path());

        let fut = self.service.call(req);

        Box::pin(async move {
            let res = fut.await?;

            println!("Hi from response");
            Ok(res)
        })
    }

thinks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.