From 15609a1e5eecf2e6167a24719d47686d11403a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Wed, 18 Mar 2026 17:28:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[document]=20rendered=5Fhtml=20=ED=81=AC?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=9C=ED=95=9C=20=EC=B6=94=EA=B0=80=20(500KB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 수입검사 저장 시 rendered_html이 Nginx 제한 초과하여 413 발생하던 문제 - max:512000 검증 추가로 413 대신 422(명확한 에러메시지) 반환 --- app/Http/Requests/Document/UpsertRequest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Document/UpsertRequest.php b/app/Http/Requests/Document/UpsertRequest.php index dc7eba3e..aa8dba85 100644 --- a/app/Http/Requests/Document/UpsertRequest.php +++ b/app/Http/Requests/Document/UpsertRequest.php @@ -30,8 +30,8 @@ public function rules(): array 'data.*.field_key' => 'required_with:data|string|max:100', 'data.*.field_value' => 'nullable|string', - // HTML 스냅샷 - 'rendered_html' => 'nullable|string', + // HTML 스냅샷 (500KB 제한 — 초과 시 413 대신 422 반환) + 'rendered_html' => 'nullable|string|max:512000', // 첨부파일 'attachments' => 'nullable|array', @@ -49,6 +49,7 @@ public function messages(): array 'item_id.required' => __('validation.required', ['attribute' => '품목 ID']), 'data.*.field_key.required_with' => __('validation.required', ['attribute' => '필드 키']), 'attachments.*.file_id.exists' => __('validation.exists', ['attribute' => '파일']), + 'rendered_html.max' => 'HTML 스냅샷이 너무 큽니다. (최대 500KB)', ]; } }