Build Link header from an array
This commit is contained in:
parent
5d40523cf4
commit
d744ee557e
1 changed files with 7 additions and 2 deletions
|
@ -37,10 +37,15 @@ class LinkHeaderMiddleware
|
||||||
{
|
{
|
||||||
$response = $response->withHeader(
|
$response = $response->withHeader(
|
||||||
'Link',
|
'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);
|
return $next($request, $response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue