Path: API › 网站管理

`POST /site`

设置或获取全局 HTTP→HTTPS 跳转配置。

## Request body

_Required._

- `request_time` (`action306.request_time`; string, required) — Unix 时间戳。
- `request_token` (`action306.request_token`; string, required) — 按 API 概览生成的签名。
- `action` (`action306.action`; string, required) — 具体操作名称。
  - one of `"set_global_http2https"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "set_global_http2https"
}
```

## Code samples

### cURL（填写面板地址与签名）

```bash
curl --request POST \
  --url "https://your-panel.example.com:8888/site" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=set_global_http2https"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "status": true,
  "msg": "设置成功",
  "data": null,
  "code": 0,
  "timestamp": 1779444586
}
```

- `status` (`action306.response.default.status`; boolean, optional) — 请求结果，`true` 表示成功
- `msg` (`action306.response.default.msg`; string, optional) — 提示信息


## set_global_http2https

## set_global_http2https / get_https_settings

设置或获取全局 HTTP→HTTPS 跳转配置。

- **路由**：`POST /site`
- **action**：`set_global_http2https`

## set_global_http2https

### 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `set_global_http2https` |

### 响应

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | 请求结果，`true` 表示成功 |
| msg | String | 提示信息 |

```json
{"status": true, "msg": "设置成功", "data": null, "code": 0, "timestamp": 1779444586}
```

