bzp2010 commented on a change in pull request #2149: URL: https://github.com/apache/apisix-dashboard/pull/2149#discussion_r716847546
##########
File path: api/conf/schema.json
##########
@@ -5204,5 +5345,166 @@
},
"version": 0.1
}
+ },
+ "stream_plugins": {
+ "ip-restriction": {
+ "priority": 3000,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "oneOf": [{
+ "required": ["whitelist"]
+ }, {
+ "required": ["blacklist"]
+ }],
+ "properties": {
+ "blacklist": {
+ "items": {
+ "anyOf": [
+ {
+
"format": "ipv4",
+
"title": "IPv4",
+ "type":
"string"
+ },
+ {
+
"pattern":
"^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
+
"title": "IPv4/CIDR",
+ "type":
"string"
+ },
+ {
+
"format": "ipv6",
+
"title": "IPv6",
+ "type":
"string"
+ },
+ {
+
"pattern":
"^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
+
"title": "IPv6/CIDR",
+ "type":
"string"
+ }
+ ]
+ },
+ "minItems": 1,
+ "type": "array"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "message": {
+ "default": "Your IP address is
not allowed",
+ "maxLength": 1024,
+ "minLength": 1,
+ "type": "string"
+ },
+ "whitelist": {
+ "items": {
+ "anyOf": [
+ {
+
"format": "ipv4",
+
"title": "IPv4",
+ "type":
"string"
+ },
+ {
+
"pattern":
"^([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/([12]?[0-9]|3[0-2])$",
+
"title": "IPv4/CIDR",
+ "type":
"string"
+ },
+ {
+
"format": "ipv6",
+
"title": "IPv6",
+ "type":
"string"
+ },
+ {
+
"pattern":
"^([a-fA-F0-9]{0,4}:){1,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$",
+
"title": "IPv6/CIDR",
+ "type":
"string"
+ }
+ ]
+ },
+ "minItems": 1,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "version": 0.1
+ },
+ "limit-conn": {
+ "priority": 1003,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "burst": {
+ "minimum": 0,
+ "type": "integer"
+ },
+ "conn": {
+ "exclusiveMinimum": 0,
+ "type": "integer"
+ },
+ "default_conn_delay": {
+ "exclusiveMinimum": 0,
+ "type": "number"
+ },
+ "disable": {
+ "type": "boolean"
+ },
+ "key": {
+ "enum": ["remote_addr",
"server_addr"],
+ "type": "string"
+ },
+ "only_use_default_delay": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "required": ["burst", "conn",
"default_conn_delay", "key"],
+ "type": "object"
+ },
+ "version": 0.1
+ },
+ "mqtt-proxy": {
+ "priority": 1000,
+ "schema": {
+ "$comment": "this is a mark for our injected
plugin schema",
+ "properties": {
+ "disable": {
+ "type": "boolean"
+ },
+ "protocol_level": {
+ "type": "integer"
+ },
+ "protocol_name": {
+ "type": "string"
+ },
+ "upstream": {
+ "oneOf": [{
+ "required": [
+ "host",
+ "port"
+ ]
+ }, {
+ "required": [
+ "ip",
+ "port"
+ ]
+ }],
+ "properties": {
+ "host": {
+ "type": "string"
+ },
+ "ip": {
+ "type": "string"
+ },
+ "port": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": ["protocol_level", "protocol_name",
"upstream"],
+ "type": "object"
+ },
+ "version": 0.1
+ }
}
-}
+}
Review comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
