Build Link header from an array

This commit is contained in:
Pierre Rudloff 2021-10-19 23:14:38 +02:00
parent 5d40523cf4
commit d744ee557e

View file

@ -37,10 +37,15 @@ class LinkHeaderMiddleware
{
$response = $response->withHeader(
'Link',
'<' . $this->router->getBasePath() . '/css/style.css>; rel=preload; as=style'
implode(
'; ',
[
'<' . $this->router->getBasePath() . '/css/style.css>',
'rel=preload', 'as=style'
]
)
);
return $next($request, $response);
}
}