Fixing proxy rewrites in non-JSON responses