跳到主要内容
版本:latest

set_https_mode

切换面板 HTTPS 全局模式。宽松模式下未部署 SSL 的网站仍可通过 HTTP 访问,严格模式下强制 HTTPS。

  • 路由POST /site
  • actionset_https_mode

输入参数

参数名称必选类型描述
actionString固定值 set_https_mode

无其他参数(切换模式,每次调用反转当前状态)。

输出参数

参数名称类型描述
statusBooleantrue 设置成功
msgString已开启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严格模式"}