|
@@ -70,10 +70,10 @@ class ApiAgent implements MiddlewareInterface
|
|
LogUtil::info('请求参数', $action['controller'], $action['action'], $params);
|
|
LogUtil::info('请求参数', $action['controller'], $action['action'], $params);
|
|
|
|
|
|
//接口限流,写到中间件中
|
|
//接口限流,写到中间件中
|
|
- if (!RedisUtil::getInstance(RedisKeyEnum::API_REQUEST_TRAFFIC)->requestLimit("{$action['controller']}/{$action['action']}", 1, 20000)) {
|
|
|
|
|
|
+ /*if (!RedisUtil::getInstance(RedisKeyEnum::API_REQUEST_TRAFFIC)->requestLimit("{$action['controller']}/{$action['action']}", 1, 20000)) {
|
|
LogUtil::info('当前访问人数过多,请稍后再试', $action['controller'], $action['action']);
|
|
LogUtil::info('当前访问人数过多,请稍后再试', $action['controller'], $action['action']);
|
|
return $this->response206();
|
|
return $this->response206();
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
$token = $this->request->header('token');
|
|
$token = $this->request->header('token');
|
|
if (empty($token)) $token = $params['token'] ?? '';
|
|
if (empty($token)) $token = $params['token'] ?? '';
|