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!