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

WebSocket Size Limit 플러그인 설정 레퍼런스

원문 보기 위키 갱신

WebSocket Size Limit 플러그인 설정 레퍼런스 (WebSocket Size Limit Plugin Configuration Reference)

이 문서는 Kong의 WebSocket Size Limit 플러그인 설정 레퍼런스예요. WebSocket Size Limit 플러그인은 WebSocket 연결에서 클라이언트와 업스트림이 주고받을 수 있는 메시지 페이로드의 최대 크기를 제한해요. 문서에서는 client_max_payload와 upstream_max_payload 옵션의 허용 값 범위를 비롯해, Consumer·Route·Service 같은 적용 스코프와 ws/wss 프로토콜 설정을 스키마 형태로 확인할 수 있어요.

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "client_max_payload": {
          "maximum": 33554432,
          "minimum": 1,
          "type": "integer"
        },
        "upstream_max_payload": {
          "maximum": 33554432,
          "minimum": 1,
          "type": "integer"
        }
      },
      "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"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "ws",
        "wss"
      ],
      "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.",
      "items": {
        "enum": [
          "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)

  • WebSocket 메시지 검증을 담당하는 플러그인의 설정 방법을 함께 살펴보세요 — WebSocket Validator plugin
  • WebSocket 프로토콜의 표준 사양인 RFC 6455 원문을 확인해 보세요 — WebSocket RFC