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

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)