소스 검색

租户模式-3

whitefang 1 년 전
부모
커밋
c51c2dbffb
1개의 변경된 파일1개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 8
      app/common/http/middleware/LikeAdminAllowMiddleware.php

+ 1 - 8
app/common/http/middleware/LikeAdminAllowMiddleware.php

@@ -77,17 +77,10 @@ class LikeAdminAllowMiddleware
             if ($firstSegment === 'workerapi' || $firstSegment === 'adminapi'){
             if ($firstSegment === 'workerapi' || $firstSegment === 'adminapi'){
                 return $this->apiHandle($request, $next);
                 return $this->apiHandle($request, $next);
             }
             }
-            elseif ($firstSegment !== 'admin') {
-                return $this->handleTenantAccess($tenantModel, $domain, $request, $next, true);
-            }
             else {
             else {
-                if ($domain !== Config::get('project.http_host')) {
-                    return view(app()->getRootPath() . 'public/error/platform/404.html');
-                }
+                return $this->handleTenantAccess($tenantModel, $domain, $request, $next, true);
             }
             }
         }
         }
-
-        return $next($request);
     }
     }
 
 
     /**
     /**