Pre-Function 플러그인 설정 레퍼런스
Pre-Function 플러그인 설정 레퍼런스 (Pre-Function Plugin Configuration Reference)
이 문서는 Pre-Function 플러그인의 설정 항목을 JSON 스키마 형태로 정리한 레퍼런스예요. access, rewrite, header_filter, log 등 각 실행 페이즈에서 동작할 코드를 지정하는 필드와 WebSocket 관련 페이즈 설정을 확인할 수 있어요. protocols, route, service, expressions 같은 플러그인 공통 옵션의 기본값과 설명도 함께 담고 있어요
출처: 문서
본문
{
"properties": {
"config": {
"properties": {
"access": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"body_filter": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"certificate": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"header_filter": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"log": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"rewrite": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"ws_client_frame": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"ws_close": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"ws_handshake": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"ws_upstream_frame": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"expressions": {
"additionalProperties": true,
"type": "object"
},
"protocols": {
"default": [
"grpc",
"grpcs",
"http",
"https"
],
"description": "A set of strings representing protocols.",
"items": {
"description": "A string representing a protocol, such as HTTP or HTTPS.",
"enum": [
"grpc",
"grpcs",
"http",
"https",
"tcp",
"tls",
"tls_passthrough",
"udp",
"ws",
"wss"
],
"type": "string"
},
"type": "array"
},
"route": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
},
"service": {
"additionalProperties": false,
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"properties": {
"id": {
"type": "string"
}
},
"type": "object"
}
}
}
관련 리소스
더 알아보기 (Learn more)
- Pre-Function으로 피크타임과 오프피크타임에 따른 요금 제한을 적용하는 방법을 다뤄요 — Apply rate limits based on peak and off-peak time with Pre-Function
- 헤더 이름을 기준으로 요청을 필터링하는 실습 가이드예요 — Filter requests based on header names
- 응답 페이즈에서 코드를 실행하는 Post-Function 플러그인 문서예요 — Post-Function plugin
- 서버리스 카테고리의 플러그인 전체 목록을 확인할 수 있어요 — All serverless plugins