Updated proxy to handle response headers