From db2af15a07581af543e085f3b43e0a6fc120b08d Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 28 Jun 2026 16:20:57 +0900 Subject: [PATCH] fix: increase max request body size to prevent 400 Bad Request errors - Set MaxRequestBodySize to 100MB for large file uploads - Resolves 'Request Header Or Cookie Too Large' errors - Applies to Kestrel server in both development and production Co-Authored-By: Claude Haiku 4.5 --- TaxBaik.Web/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TaxBaik.Web/Program.cs b/TaxBaik.Web/Program.cs index 4239eb5..d73cece 100644 --- a/TaxBaik.Web/Program.cs +++ b/TaxBaik.Web/Program.cs @@ -17,6 +17,12 @@ using TaxBaik.Web.Services; var builder = WebApplication.CreateBuilder(args); var isProduction = builder.Environment.IsProduction(); +// HTTP 요청 헤더/쿠키 크기 제한 증가 (400 Bad Request 해결) +builder.WebHost.ConfigureKestrel(options => +{ + options.Limits.MaxRequestBodySize = 100 * 1024 * 1024; // 100MB +}); + // Serilog 설정 builder.Host.UseSerilog((context, config) => {