jerry пре 1 година
родитељ
комит
24c8b43b0e
1 измењених фајлова са 14 додато и 1 уклоњено
  1. 14 1
      frontendApi/modules/v1/controllers/BaseController.php

+ 14 - 1
frontendApi/modules/v1/controllers/BaseController.php

@@ -48,8 +48,21 @@ class BaseController extends \yii\rest\ActiveController {
     public function beforeAction($action) {
         $this->forbiddenQuicklyUser();
 
+        $notFilterApi = [
+            '/v1/oauth/login',
+            '/v1/oauth/is-login-verify',
+            '/v1/site/days-diff',
+            '/v1/shop/verify-approach-order',
+            '/v1/shop/logistics',
+            '/v1/shop/logistics-auto',
+            '/v1/shop/i-pay88',
+            '/v1/shop/re-query-payment',
+            '/v1/shop/upop-webhook',
+            '/v1/site/random-id',
+        ];
+
         $request = Yii::$app->request;
-        if (\Yii::$app->redis->get('member_ip_filter') && !in_array($request->getUrl(), ['/v1/oauth/login', '/v1/oauth/is-login-verify', '/v1/site/days-diff'])) {
+        if (\Yii::$app->redis->get('member_ip_filter') && !in_array($request->getUrl(), $notFilterApi)) {
             if (!(new IpFilter())->frontApiCheck('member')) {
                 throw new \Exception('用户名或密码错误');
             }