add proxy middlewares