fix: ApiKeyMiddleware null route 오류 수정
- request->route()가 null일 때 발생하는 오류 수정 - null-safe 연산자(?->) 및 null coalescing 연산자(??) 사용 - Line 122: route()->uri() → route()?->uri() ?? path()
This commit is contained in:
@@ -119,7 +119,7 @@ public function handle(Request $request, Closure $next)
|
||||
];
|
||||
|
||||
// 현재 라우트 확인 (경로 또는 이름)
|
||||
$currentRoute = $request->route()->uri(); // 또는 $request->path()
|
||||
$currentRoute = $request->route()?->uri() ?? $request->path();
|
||||
|
||||
if (! in_array($currentRoute, $allowWithoutAuth)) {
|
||||
// 인증정보(api_user, tenant_id) 없으면 튕김
|
||||
|
||||
Reference in New Issue
Block a user