Remove paths before returning response.