docs: add missing fields in SSL API (#2804)

This commit is contained in:
罗泽轩 2020-11-20 20:08:50 +08:00 committed by GitHub
parent 009cab65b5
commit 2622e38ae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -658,8 +658,10 @@ Return response from etcd currently.
|Parameter |Required |Type |Description |Example| |Parameter |Required |Type |Description |Example|
|---------|---------|----|-----------|----| |---------|---------|----|-----------|----|
|cert|True|Public key|https Public key|| |cert|True|Certificate|https certificate||
|key|True|Private key|https Private key|| |key|True|Private key|https private key||
|certs|False|An array of certificate|when you need to configure multiple certificate for the same domain, you can pass extra https certificates (excluding the one given as cert) in this field||
|keys|False|An array of private key|https private keys. The keys should be paired with certs above||
|sni|True|Match Rules|https SNI|| |sni|True|Match Rules|https SNI||
|labels|False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}| |labels|False |Match Rules|Key/value pairs to specify attributes|{"version":"v2","build":"16","env":"production"}|
|create_time|False| Auxiliary|epoch timestamp in second, will be created automatically if missing | 1602883670| |create_time|False| Auxiliary|epoch timestamp in second, will be created automatically if missing | 1602883670|
@ -670,7 +672,7 @@ Config Example:
```shell ```shell
{ {
"id": "1", # id "id": "1", # id
"cert": "cert", # Public key "cert": "cert", # Certificate
"key": "key", # Private key "key": "key", # Private key
"sni": "sni" # https SNI "sni": "sni" # https SNI
} }

View File

@ -671,8 +671,10 @@ HTTP/1.1 200 OK
|名字 |可选项 |类型 |说明 |示例| |名字 |可选项 |类型 |说明 |示例|
|---------|---------|----|-----------|----| |---------|---------|----|-----------|----|
|cert|必需|公钥|https 证书公钥|| |cert|必需|证书|https 证书||
|key|必需|私钥|https 证书私钥|| |key|必需|私钥|https 证书私钥||
|certs|可选|证书字符串数组|当你想给同一个域名配置多个证书时除了第一个证书需要通过cert传递外剩下的证书可以通过该参数传递上来||
|keys|可选|私钥字符串数组|certs 对应的证书私钥,注意要跟 certs 一一对应||
|sni|必需|匹配规则|https 证书SNI|| |sni|必需|匹配规则|https 证书SNI||
|labels|可选|匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}| |labels|可选|匹配规则|标识附加属性的键值对|{"version":"v2","build":"16","env":"production"}|
|create_time|可选|辅助|单位为秒的 epoch 时间戳,如果不指定则自动创建|1602883670| |create_time|可选|辅助|单位为秒的 epoch 时间戳,如果不指定则自动创建|1602883670|
@ -683,7 +685,7 @@ ssl 对象 json 配置内容:
```shell ```shell
{ {
"id": "1", # id "id": "1", # id
"cert": "cert", # 公钥 "cert": "cert", # 证书
"key": "key", # 私钥 "key": "key", # 私钥
"sni": "sni" # host 域名 "sni": "sni" # host 域名
} }