Fixing reverse proxy URI rewrites for JSON responses