Skip to content
Navigation

URL 级别的缓存、Gzip 和自定义配置

以下 API 用于对特定 proxy_path 设置独立的缓存、Gzip 和自定义 Nginx 配置。

POST
https://your-panel.example.com:8888/mod/proxy/com/{action}/stype
更新于 查看 Markdown

Path parameters

  • actionstringrequired

    具体操作名称,参见下方原始接口文档。

Request bodyX-WWW-FORM-URLENCODEDrequired

  • request_timestringrequired

    Unix 时间戳。

  • request_tokenstringrequired

    按 API 概览生成的签名。

  • site_namestringrequired

    站点名称

  • proxy_pathstringrequired

    代理路径

  • cache_status/dintegerrequired

    1 开启,0 关闭

  • cache_suffixstringrequired

    缓存的文件后缀,如 css,js,jpg,jpeg,gif,png

  • expiresoptionalstring

    缓存过期时间,默认 1d

Returns

default

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

各操作详细说明

set_url_cache / set_url_gzip / set_url_custom_confURL 级别的缓存、Gzip 和自定义配置

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": "设置成功!"}

Type to search…

↑↓ navigate↵ selectEsc close