요청 크기 제한 정책 설정 레퍼런스
요청 크기 제한 정책 설정 레퍼런스 (Request Size Limiting Policy Configuration Reference)
이 문서는 요청 크기 제한 정책에서 사용하는 설정 옵션을 JSON 스키마 형태로 정리한 레퍼런스예요. 허용 페이로드 크기(allowed_payload_size)는 기본값이 128MB이고, size_unit 옵션으로 bytes, kilobytes, megabytes 단위를 선택할 수 있어요. require_content_length를 true로 설정하면 요청 본문을 읽기 전에 유효한 Content-Length 헤더가 있는지 반드시 확인하도록 강제할 수 있어요. size_unit 설정은 Kong Gateway 1.3과 Kong Gateway (OSS) 2.0 이전 버전에서는 사용할 수 없다는 점도 기억해두면 좋아요
출처: 문서
본문
{
"properties": {
"config": {
"type": "object",
"properties": {
"allowed_payload_size": {
"type": "integer",
"description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).",
"default": 128
},
"size_unit": {
"type": "string",
"enum": [
"bytes",
"kilobytes",
"megabytes"
],
"description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.",
"default": "megabytes"
},
"require_content_length": {
"type": "boolean",
"description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.",
"default": false
}
}
}
}
}
관련 리소스
더 알아보기 (Learn more)
- AI Gateway에서 정책을 구성하는 엔티티의 구조를 이해하면 이 설정이 어디에 적용되는지 파악하기 쉬워요 — AI Policy entity
- 정책과 함께 다루는 AI 모델 엔티티의 개념을 확인하면 전체 설정 맥락을 잡는 데 도움이 돼요 — AI Model entity