diff --git a/app/Http/Middleware/ApiKeyMiddleware.php b/app/Http/Middleware/ApiKeyMiddleware.php index 707ce3ce..6795a8c5 100644 --- a/app/Http/Middleware/ApiKeyMiddleware.php +++ b/app/Http/Middleware/ApiKeyMiddleware.php @@ -143,6 +143,12 @@ public function handle(Request $request, Closure $next) 'api/v1/internal/exchange-token', // 내부 서버간 토큰 교환 (HMAC 인증 사용) 'api/v1/admin/fcm/*', // Admin FCM API (MNG에서 API Key만으로 접근) 'api/v1/app/*', // 앱 버전 확인/다운로드 (API Key만 필요) + 'api/v1/bending-items', // 절곡 기초관리 (MNG에서 API Key + X-TENANT-ID로 접근) + 'api/v1/bending-items/*', // 절곡 기초관리 상세/수정/삭제 + 'api/v1/guiderail-models', // 절곡품 가이드레일 (MNG에서 API Key + X-TENANT-ID로 접근) + 'api/v1/guiderail-models/*', // 절곡품 가이드레일 상세 + 'api/v1/items/*/files', // 품목 파일 (절곡품 이미지 업로드/조회) + 'api/v1/files/*/presigned-url', // 파일 presigned URL (이미지 표시) ]; // 현재 라우트 확인 (경로 또는 이름) diff --git a/app/Http/Resources/Api/V1/BendingItemResource.php b/app/Http/Resources/Api/V1/BendingItemResource.php index ef5ee98a..0bf13c76 100644 --- a/app/Http/Resources/Api/V1/BendingItemResource.php +++ b/app/Http/Resources/Api/V1/BendingItemResource.php @@ -76,6 +76,10 @@ private function getImageFileId(): ?int private function getImageUrl(): ?string { - return $this->getImageFile()?->presignedUrl(); + try { + return $this->getImageFile()?->presignedUrl(); + } catch (\Throwable) { + return null; + } } }