Cannot unset offset 'Authorization'|'Host' on array<int<0, max>, array{string, mixed}>.
Thus do not mix up the parent array's $key with the $key of the child array inside the parent array's $value, basically.
Compare similar code at the bottom of https://we.phorge.it/source/phorge/browse/master/src/aphront/response/AphrontHTTPProxyResponse.php doing it right.