URL 级别配置
以下 API 用于对特定 proxy_path 设置独立的缓存、Gzip 和自定义 Nginx 配置。
- 路由:
POST /mod/proxy/com/{action}/stype
set_url_cache — 设置 URL 级别缓存
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| site_name | 是 | string | 站点名称 |
| proxy_path | 是 | string | 代理路径 |
| cache_status/d | 是 | int | 1 开启,0 关闭 |
| expires | 否 | string | 缓存过期时间,默认 1d |
| cache_suffix | 是 | string | 缓存的文件后缀,如 css,js,jpg,jpeg,gif,png |
响应
{"code": 0, "status": true, "msg": "设置成功!"}
set_url_gzip — 设置 URL 级别 Gzip
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| site_name | 是 | string | 站点名称 |
| proxy_path | 是 | string | 代理路径 |
| gzip_status/d | 是 | int | 1 开启,0 关闭 |
响应
{"code": 0, "status": true, "msg": "设置成功!"}
set_url_custom_conf — 设置 URL 级别自定义配置
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| site_name | 是 | string | 站点名称 |
| proxy_path | 是 | string | 代理路径 |
| custom_conf | 是 | string | Nginx 自定义配置内容 |
响应
{"code": 0, "status": true, "msg": "设置成功!"}