async fn rewrite_root_to_v2(req: Request, next: Next) -> ResponseExpand description
Middleware to rewrite root paths to /v2 paths
Requests to /rewards/... get rewritten to /v2/rewards/...
Paths already prefixed with /v2 are left unchanged
Note: This middleware is only applied to the v2 router, so v1 routes never pass through it