본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Request Transformer 플러그인 구성 참조

원문 보기 위키 갱신

Request Transformer 플러그인 구성 참조 (Request Transformer Plugin Configuration Reference)

이 문서는 Kong의 Request Transformer 플러그인에서 설정할 수 있는 구성 옵션을 스키마 형태로 정리한 참조 자료예요. 요청의 body, 헤더, 쿼리스트링에 대해 값 추가(add), 덧붙이기(append), 제거(remove), 이름 바꾸기(rename), 교체(replace)를 지정하는 방법과 HTTP 메서드를 변경하는 http_method 옵션을 설명해요. 각 필드의 데이터 타입과 기본값이 함께 표시되어 있어서 플러그인 설정을 작성하거나 검토할 때 바로 참고할 수 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "add": {
          "properties": {
            "body": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "querystring": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "append": {
          "properties": {
            "body": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "querystring": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "http_method": {
          "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.",
          "type": "string"
        },
        "remove": {
          "properties": {
            "body": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "querystring": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "rename": {
          "properties": {
            "body": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "querystring": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "replace": {
          "properties": {
            "body": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "querystring": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "uri": {
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "consumer_group": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "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)

  • 요청 변환 기능을 더 확장한 고급 버전의 설정 방법이 궁금하다면 이 문서를 확인해 보세요 — Request Transformer Advanced plugin
  • AI 백엔드로 보내는 요청을 변환해야 한다면 이 플러그인 문서를 참고하세요 — AI Request Transformer