mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
Update MicroCaching.php
This commit is contained in:
parent
44f08a5886
commit
21535a403a
@ -15,6 +15,7 @@ class MicroCaching
|
|||||||
'RandomController@characters',
|
'RandomController@characters',
|
||||||
'RandomController@people',
|
'RandomController@people',
|
||||||
'RandomController@users',
|
'RandomController@users',
|
||||||
|
'InsightsController@main'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,10 +27,12 @@ class MicroCaching
|
|||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
$route = explode('\\', $request->route()[1]['uses']);
|
if (isset($request->route()[1]['uses'])) {
|
||||||
$route = end($route);
|
$route = explode('\\', $request->route()[1]['uses']);
|
||||||
if (\in_array($route, self::NO_CACHING)) {
|
$route = end($route);
|
||||||
return $next($request);
|
if (\in_array($route, self::NO_CACHING)) {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->header('auth') === env('APP_KEY')) {
|
if ($request->header('auth') === env('APP_KEY')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user