跳到主要内容
版本:latest

URL 级别配置

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

  • 路由POST /mod/proxy/com/{action}/stype

set_url_cache — 设置 URL 级别缓存

输入参数

参数名称必选类型描述
site_namestring站点名称
proxy_pathstring代理路径
cache_status/dint1 开启,0 关闭
expiresstring缓存过期时间,默认 1d
cache_suffixstring缓存的文件后缀,如 css,js,jpg,jpeg,gif,png

响应

{"code": 0, "status": true, "msg": "设置成功!"}

set_url_gzip — 设置 URL 级别 Gzip

输入参数

参数名称必选类型描述
site_namestring站点名称
proxy_pathstring代理路径
gzip_status/dint1 开启,0 关闭

响应

{"code": 0, "status": true, "msg": "设置成功!"}

set_url_custom_conf — 设置 URL 级别自定义配置

输入参数

参数名称必选类型描述
site_namestring站点名称
proxy_pathstring代理路径
custom_confstringNginx 自定义配置内容

响应

{"code": 0, "status": true, "msg": "设置成功!"}