get_dir_auth
获取指定网站的目录密码保护(HTTP Basic Auth)配置列表。
- 路由:
POST /site - action:
get_dir_auth
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 get_dir_auth |
| id | 否 | Integer | 网站 ID |
| siteName | 否 | String | 网站域名(与 id 二选一) |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| - | Object | 以域名为 key 的目录保护配置对象 |
示例
请求
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
action=get_dir_auth&id=1
响应
{"testapi.bt.local": []}
空数组表示该站点暂无目录保护配置。