配置管理
更新系统配置
使用补丁方式更新系统配置
patch/api/v1/config
Request body
Example request
{
"engine": {
"appConfig": [
{
"logFile": "/dev/stdout",
"logFormat": "console",
"logLevel": "info",
"name": "coraza",
"transactionTTL": 60000
}
],
"asnDBPath": "/opt/geoip/GeoLite2-ASN.mmdb",
"bind": "127.0.0.1:2342",
"cityDBPath": "/opt/geoip/GeoLite2-City.mmdb",
"flowController": {
"attackLimit": {
"blockDuration": 600,
"burstCount": 10,
"enabled": true,
"paramsCapacity": 10000,
"statDuration": 60,
"threshold": 100
},
"errorLimit": {
"blockDuration": 600,
"burstCount": 10,
"enabled": true,
"paramsCapacity": 10000,
"statDuration": 60,
"threshold": 100
},
"visitLimit": {
"blockDuration": 600,
"burstCount": 10,
"enabled": true,
"paramsCapacity": 10000,
"statDuration": 60,
"threshold": 100
}
},
"useBuiltinRules": true
},
"haproxy": {
"backupsNumber": 5,
"configBaseDir": "/RuiQi",
"haproxyBin": "haproxy",
"spoeAgentAddr": "127.0.0.1",
"spoeAgentPort": 2342,
"thread": 4
},
"name": "AppConfig"
}Response
配置更新成功
Example response
{
"code": 200,
"data": {
"engine": {
"appConfig": [
{
"transactionTTL": 60000
}
]
}
},
"message": "操作成功",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"timestamp": "2023-01-01T12:00:00Z"
}