Skip to content

Commit

Permalink
fixing middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
MelonSmasher committed Nov 27, 2017
1 parent ce661af commit 054d02d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ class Kernel extends HttpKernel

'api' => [
'throttle:60,1',
'bindings',
\App\Http\Middleware\ShowSessionTTLHeader::class,
'bindings'
],
];

Expand All @@ -65,6 +64,7 @@ class Kernel extends HttpKernel
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'timeout' => \App\Http\Middleware\SessionTimeout::class,
'ttl.header' => \App\Http\Middleware\ShowSessionTTLHeader::class,

/**
* Access Middleware
Expand Down
2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* https://stackoverflow.com/questions/38664222/dingo-api-how-to-add-version-number-in-url/
* https://github.com/dingo/api/issues/1221
*/
$api->group(['prefix' => 'v1', 'namespace' => 'App\Http\Controllers\API\V1'], function ($api) {
$api->group(['prefix' => 'v1', 'namespace' => 'App\Http\Controllers\API\V1', 'middleware' => 'ttl.header'], function ($api) {

$api->get('/', ['uses' => 'ApiController@index', 'as' => 'api.index']);

Expand Down

0 comments on commit 054d02d

Please sign in to comment.