refactor: 添加不需要记录日志的api过滤
This commit is contained in:
@@ -30,6 +30,12 @@ class OperateLog
|
||||
Cache::set('sys_restful_api:map:name', $restful_api_name_map);
|
||||
}
|
||||
|
||||
// 忽略日志记录的Api
|
||||
$ignore_apis = env('ADMIN_API.IGNORE_LOGGING_LIST');
|
||||
if (in_array($request->pathinfo(), $ignore_apis)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
$log = [
|
||||
'user_id' => $request->uid,
|
||||
'title' => $restful_api_name_map[$request->method() . '-' . $request->controller() . '/' . $request->action()] ?? '',
|
||||
|
||||
Reference in New Issue
Block a user