网关插件管理
功能概述
此功能主要提供对网关插件维护功能
操作说明
补充说明
下面以日志插件为例,对其参数定义格式如下
{
"type": "object",
"properties": {
"url_to_post": {
"default": "http://entry.newdao-tenant-xxxx/logging/fangwenrz/jieshousj",
"title": "日志接收服务地址",
"type": "string"
},
"allowed_method": {
"default": "GET,POST,PUT,DELETE",
"title": "允许的请求方法",
"type": "string"
},
"cares": {
"title": "用户特别关心的接口设置",
"type": "array",
"default": [],
"widget": "cardList",
"items": {
"type": "object",
"properties": {
"name": {
"title": "配置名称",
"type": "string"
},
"value": {
"title": "配置内容",
"type": "object",
"properties": {
"allowed_method": {
"default": "GET,POST,PUT,DELETE",
"title": "允许的请求方法",
"type": "string"
},
"log_type": {
"title": "日志类型",
"type": "string"
},
"api_uri": {
"title": "API访问路径",
"type": "string"
},
"sample_ratio": {
"title": "日志接收概率(大于0,小于等于1)",
"type": "number"
},
"label": {
"title": "标签",
"type": "string"
},
"expire_seconds": {
"title": "超时模式的超时时间(秒)",
"type": "number"
},
"use_sample_type": {
"default": true,
"title": "使用概率模式",
"type": "boolean"
}
}
}
}
}
},
"log_group": {
"default": "default",
"title": "log_group",
"type": "string"
},
"black_list": {
"default": "",
"title": "忽略的请求",
"type": "string"
},
"max_resp_body_size": {
"default": 10240,
"title": "最大返回体大小",
"type": "number"
},
"include_query": {
"default": [
"^/wf/"
],
"title": "需要包含请求查询的地址(用逗号分隔)的数组",
"type": "string"
},
"max_req_body_size": {
"default": 10240,
"title": "最大请求体大小",
"type": "number"
},
"ignore_with_query": {
"default": "",
"title": "忽略带指定参数的请求",
"type": "string"
},
"record_resp_body": {
"default": false,
"title": "是否记录返回体",
"type": "boolean"
},
"log_type": {
"default": "default",
"title": "log_type",
"type": "string"
},
"ignore_ext": {
"default": [
"/pcapp/",
"%.js$",
"%.htm.?$",
"%.png$",
"%.jp.?g$",
"%.svg$",
"%.css$",
"%.ico$",
"%.json$",
"%.w$"
],
"title": "忽略的文件类型",
"type": "string"
},
"sample_ratio": {
"default": 0.2,
"title": "日志接收概率(大于0,小于等于1)",
"type": "number"
},
"record_req_body": {
"default": false,
"title": "是否记录请求体",
"type": "boolean"
},
"expire_seconds": {
"default": 120,
"title": "超时模式的超时时间(秒)",
"type": "number"
},
"use_sample_type": {
"default": true,
"title": "使用概率模式",
"type": "boolean"
}
},
"labelWidth": 180
}