protected function responseWithHeaders($response) { foreach ($this->getHeaders() as $key => $value) { $response->headers->set($key, $value); } return $response; }