set_https_mode
切换面板 HTTPS 全局模式。宽松模式下未部署 SSL 的网站仍可通过 HTTP 访问,严格模式下强制 HTTPS。
- 路由:
POST /site - action:
set_https_mode
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 set_https_mode |
无其他参数(切换模式,每次调用反转当前状态)。
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| status | Boolean | true 设置成功 |
| msg | String | 已开启HTTPS严格模式 或 已关闭HTTPS严格模式 |
示例
请求
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
action=set_https_mode
响应
{"status": true, "msg": "已开启HTTPS严格模式"}