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

Request Termination 플러그인 설정 참조

원문 보기 위키 갱신

Request Termination 플러그인 설정 참조 (Request Termination Plugin Configuration Reference)

이 문서는 Kong의 Request Termination 플러그인에서 사용할 수 있는 모든 설정 파라미터를 정리한 설정 참조 문서예요. Request Termination 플러그인은 매칭된 요청을 의도적으로 차단하고, 대신 상태 코드와 메시지 같은 사용자 지정 응답을 반환할 때 사용해요. status_code와 message 같은 응답 구성 옵션부터 consumer, consumer_group, route 같은 적용 범위 설정까지 각 필드의 타입과 기본값을 한눈에 확인할 수 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "body": {
          "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.",
          "type": "string"
        },
        "content_type": {
          "description": "Content type of the raw response configured with `config.body`.",
          "type": "string"
        },
        "echo": {
          "default": false,
          "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.",
          "type": "boolean"
        },
        "message": {
          "description": "The message to send, if using the default response generator.",
          "type": "string"
        },
        "status_code": {
          "default": 503,
          "description": "The response code to send. Must be an integer between 100 and 599.",
          "maximum": 599,
          "minimum": 100,
          "type": "integer"
        },
        "trigger": {
          "description": "A string representing an HTTP header name.",
          "type": "string"
        }
      },
      "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 HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "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)