|
|
|
@ -144,11 +144,11 @@ class RequestValidationMiddleware(BaseHTTPMiddleware):
|
|
|
|
if content_type.startswith("application/json"):
|
|
|
|
if content_type.startswith("application/json"):
|
|
|
|
body = await request.body()
|
|
|
|
body = await request.body()
|
|
|
|
|
|
|
|
|
|
|
|
if len(body) > MAX_JSON_BODY_SIZE:
|
|
|
|
#if len(body) > MAX_JSON_BODY_SIZE:
|
|
|
|
raise HTTPException(
|
|
|
|
# raise HTTPException(
|
|
|
|
status_code=413,
|
|
|
|
# status_code=413,
|
|
|
|
detail="JSON body too large",
|
|
|
|
# detail="JSON body too large",
|
|
|
|
)
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
|
|
if body:
|
|
|
|
if body:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
|