增加缓存配置
开发中
开发环境
http://39.100.59.112:8000
开发环境
http://39.100.59.112:8000
POST
http://39.100.59.112:8000
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Accept
string
必需
默认值:
application/json
Body 参数application/json
domain_uuid
string
域名uuid
默认值:
active
boolean
是否开启
urlmode
string
url匹配模式
默认值:
full
cachemode
string
缓存匹配模式
cachepath
string | null
类型:路径匹配
cacheextensions
string | null
类型:后缀匹配
cachereg
string | null
类型:正则表达式匹配
timeout
integer
缓存过期时间min
weight
integer
权重
示例
{
"domain_uuid": "",
"active": true,
"urlmode": "full",
"cachemode": "string",
"cachepath": "string",
"cacheextensions": "string",
"cachereg": "string",
"timeout": 0,
"weight": 0
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://39.100.59.112:8000/caches/config' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain_uuid": "",
"active": true,
"urlmode": "full",
"cachemode": "string",
"cachepath": "string",
"cacheextensions": "string",
"cachereg": "string",
"timeout": 0,
"weight": 0
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
cache_uuid
string
缓存uuid
domain_uuid
string
域名uuid
active
boolean
开关
urlmode
string
url匹配模式
cachemode
string
缓存匹配模式
cachepath
string
类型:目录
cacheextensions
string
类型:文件后缀名
cachereg
string
类型:正则
timeout
integer
过期时间
weight
integer
权重
示例
{
"code": 0,
"message": "string",
"data": {
"cache_uuid": "string",
"domain_uuid": "string",
"active": true,
"urlmode": "string",
"cachemode": "string",
"cachepath": "string",
"cacheextensions": "string",
"cachereg": "string",
"timeout": 0,
"weight": 0
}
}