api 默认设置 /v1/user-configs 1个月前发布2605 获取默认设置列表 GET/v1/user-configs调试 page integer 当前页码 limit integer 单页显示数量 type string 配置类别,可选为site, stream,cert,即网站,四层转发,证书 name string 配置项,如proxy_cache,proxy_timeout等,即网站缓存,超时时间 enable boolean 可选值为1和0,1为启用,0为禁用 truefalse 返回结果 { "code": 0, "count": 2, "data": [{ "create_at": "2023-06-01 16:00:12", "enable": 1, "id": 3, "name": "proxy_cache", "scope_id": 0, "scope_name": "global", "site_group_name": null, "stream_group_name": null, "type": "site", "uid": 2, "update_at": "2023-06-01 16:00:12", "value": "[{\"type\":\"suffix\",\"content\":\"1\",\"expire\":\"1\",\"unit\":\"d\",\"ignore_arg\":false,\"range\":false,\"proxy_ignore_headers\":\"\",\"no_cache\":[]}]" }, { "create_at": "2023-06-01 15:37:54", "enable": 1, "id": 2, "name": "extra_cc_rule", "scope_id": 0, "scope_name": "global", "site_group_name": null, "stream_group_name": null, "type": "site", "uid": 2, "update_at": "2023-06-01 15:58:56", "value": "[{\"matcher\":{\"ip\":{\"operator\":\"=\",\"value\":\"aa\"}},\"filter\":{\"within_second\":\"11\",\"max_challenge\":\"11111\",\"max_per_uri\":\"11111\",\"type\":\"click_filter\",\"extra\":{}}}]" }] } 添加默认设置 POST/v1/user-configs调试 type string required 配置类别,可选为site, stream,cert,即网站,四层转发,证书 name string required 配置项,类别为site支持的配置项有proxy_cache(网站缓存),http_listen-port(http默认监听端口), https_listen-port(https默认监听端口), backend_http_port(默认回源http端口), backend_https_port(默认回源https端口),recv_real_time(实时接收),send_real_time(实时发送),https_listen-hsts(开启hsts), https_listen-http2(开启http2), https_listen-force_ssl_enable(强制https), ups_keepalive(启用回源连接池), range(分片回源), gzip_enable(启用gzip压缩), websocket_enable(开启websocket), block_proxy(屏蔽代理), https_listen-ocsp_stapling(开启oscp stapling),https_listen-ssl_protocols(ssl协议),https_listen-ssl_ciphers(ssl套件),https_listen-ssl_prefer_server_ciphers,backend_protocol(回源协议),proxy_timeout(回源超时),proxy_http_version(回源http版本),ups_keepalive_conn(连接池最大空闲数),ups_keepalive_timeout(空闲连接的超时时间),proxy_ssl_protocols(回源ssl协议),balance_way(负载方式),gzip_types(gzip压缩类型),post_size_limit(上传最大大小),cc_default_rule(默认cc规则),req_header(请求头),extra_cc_rule(自定义规则) value string 配置项的时,参数网站添加部分 scope_name string 生效范围,可选为global, group,即全局和分组,默认全局 scope_id string 可生效范围为group时,此值为分组的id 返回结果 提交内容 { "code":0, "data": "1", "msg": "用户配置添加成功" } 修改一个默认设置 PUT/v1/user-configs/<默认设置ID>调试 type string required 配置类别,可选为site, stream,cert,即网站,四层转发,证书 name string required 配置项,类别为site支持的配置项有proxy_cache(网站缓存),http_listen-port(http默认监听端口), https_listen-port(https默认监听端口), backend_http_port(默认回源http端口), backend_https_port(默认回源https端口),recv_real_time(实时接收),send_real_time(实时发送),https_listen-hsts(开启hsts), https_listen-http2(开启http2), https_listen-force_ssl_enable(强制https), ups_keepalive(启用回源连接池), range(分片回源), gzip_enable(启用gzip压缩), websocket_enable(开启websocket), block_proxy(屏蔽代理), https_listen-ocsp_stapling(开启oscp stapling),https_listen-ssl_protocols(ssl协议),https_listen-ssl_ciphers(ssl套件),https_listen-ssl_prefer_server_ciphers,backend_protocol(回源协议),proxy_timeout(回源超时),proxy_http_version(回源http版本),ups_keepalive_conn(连接池最大空闲数),ups_keepalive_timeout(空闲连接的超时时间),proxy_ssl_protocols(回源ssl协议),balance_way(负载方式),gzip_types(gzip压缩类型),post_size_limit(上传最大大小),cc_default_rule(默认cc规则),req_header(请求头),extra_cc_rule(自定义规则) value string 配置项的时,参数网站添加部分 scope_name string 生效范围,可选为global, group,即全局和分组,默认全局 scope_id string 可生效范围为group时,此值为分组的id enable boolean 1为启用,0为禁用 truefalse 返回结果 提交内容 { "code":0, "data": "1", "msg": "用户配置更新成功" } 禁用或启用多个默认设置(数据类型为数组) PUT/v1/user-configs调试 enable boolean 1为启用,0为禁用 truefalse 返回结果 提交内容 { "code":0, "data": "1", "msg": "用户配置更新成功" } 删除配置 DELETE/v1/user-configs/<配置ID,多个以逗号分隔>调试 返回结果 { "code": 0, "data": "", "msg": "配置删除成功" } © 版权声明文章版权归作者所有,转载请预留文章地址。s.wbsun.net
暂无评论内容