Skip to content

Commit 822ea3a

Browse files
authored
Adding missing "as" to style link header
1 parent b1b12fa commit 822ea3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_link.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ You can also add links to the HTTP response directly from controllers and servic
164164
public function index(Request $request): Response
165165
{
166166
// using the addLink() shortcut provided by AbstractController
167-
$this->addLink($request, new Link('preload', '/app.css'));
167+
$this->addLink($request, (new Link('preload', '/app.css'))->withAttribute('as', 'style'));
168168

169169
// alternative if you don't want to use the addLink() shortcut
170170
$linkProvider = $request->attributes->get('_links', new GenericLinkProvider());

0 commit comments

Comments
 (0)