Skip to content

Commit

Permalink
Merge pull request #10 from tankerkiller125/patch-1
Browse files Browse the repository at this point in the history
Update readme to add middleware to web group
  • Loading branch information
JacobBennett authored Jan 11, 2017
2 parents c4efac5 + 4e1ea8b commit 72549ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ You can install the package via composer:
$ composer require jacobbennett/laravel-http2serverpush
```

Next you must add the `\JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush`-middleware to the kernel.
Next you must add the `\JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush`-middleware to the kernel. Adding it to the web group is recommeneded as API's do not have assets to push.
```php
// app/Http/Kernel.php

...
protected $middleware = [
protected $middlewareGroups = [
'web' => [
...
\JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush::class,
...
],
...
\JacobBennett\Http2ServerPush\Middleware\AddHttp2ServerPush::class,
];
```

Expand Down

0 comments on commit 72549ff

Please sign in to comment.