跳到主要内容
版本:latest

GetDirUserINI

获取指定网站的目录保护和安全配置状态,包括防跨站攻击、日志开关、Git 同步及密码访问状态。

  • 路由POST /site
  • actionGetDirUserINI

输入参数

参数名称必选类型描述
actionString固定值 GetDirUserINI
idInteger网站 ID
pathString网站根目录路径,如 /www/wwwroot/testapi.bt.local

输出参数

参数名称类型描述
sync_gitBoolean是否开启 Git 同步
logsBoolean是否开启日志
useriniBoolean是否启用防跨站保护
runPathObject运行目录信息 {runPath, dirs}
passBoolean是否启用密码访问保护

示例

请求

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
}