GetDirUserINI
获取指定网站的目录保护和安全配置状态,包括防跨站攻击、日志开关、Git 同步及密码访问状态。
- 路由:
POST /site - action:
GetDirUserINI
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 GetDirUserINI |
| id | 是 | Integer | 网站 ID |
| path | 是 | String | 网站根目录路径,如 /www/wwwroot/testapi.bt.local |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| sync_git | Boolean | 是否开启 Git 同步 |
| logs | Boolean | 是否开启日志 |
| userini | Boolean | 是否启用防跨站保护 |
| runPath | Object | 运行目录信息 {runPath, dirs} |
| pass | Boolean | 是否启用密码访问保护 |
示例
请求
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
request_time=1700000000&request_token=xxx&action=GetDirUserINI&id=1&path=/www/wwwroot/testapi.bt.local
响应
{
"sync_git": false,
"logs": true,
"userini": true,
"runPath": {"runPath": "/", "dirs": ["/"]},
"pass": false
}