protected function generateAndAttachLinkHeaders(Response $response)
{
$headers = $this->fetchLinkableNodes($response)->flatten(1)->map(function ($url) {
return $this->buildLinkHeaderString($url);
})->filter()->implode(',');
if (!empty(trim($headers))) {
$this->addLinkHeader($response, $headers);
}
return $this;
}