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@people',
|
||||
'RandomController@users',
|
||||
'InsightsController@main'
|
||||
];
|
||||
|
||||
/**
|
||||
@ -26,10 +27,12 @@ class MicroCaching
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$route = explode('\\', $request->route()[1]['uses']);
|
||||
$route = end($route);
|
||||
if (\in_array($route, self::NO_CACHING)) {
|
||||
return $next($request);
|
||||
if (isset($request->route()[1]['uses'])) {
|
||||
$route = explode('\\', $request->route()[1]['uses']);
|
||||
$route = end($route);
|
||||
if (\in_array($route, self::NO_CACHING)) {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->header('auth') === env('APP_KEY')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user