Files
ipass-plugin-cache/conf/server.cache.conf
T
ssw 43718bd0c4 iPass cache gateway 源码
容量管理: zones.rs 直读 nginx file_cache 共享内存记账(双轴: 磁盘 + keys_zone 索引内存), ?scan=1 扫盘上限 20 万文件; POST /api/admin/cache/purge 整区清理(只删文件不删目录, 根治 [crit] mkdir failed); POST /api/admin/cache/invalidate 按制品精准失效(预览->确认两步式, glob/子串, 删除上限 5000/扫描上限 20 万); GET /api/admin/cache 新增 capacity 块; 前端容量面板 + 按制品失效工具条; 测试 test-cache-capacity.sh 48/48(容量 27 + 精准失效 21, 含 EXPECT_MIN 护栏与前端静态契约); docs 容量管理章节
2026-09-21 09:25:11 +08:00

31 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================================
# server.cache.conf —— 统一制品缓存 server(明文入口)
#
# 这是**内网 / 本机 e2e** 用的明文入口。对外的 https 入口在 conf/tls/*.conf
# (模板见 conf/tls/cache.conf.example)——两者 include 同一份 cache-routes.conf,
# 所以路由只此一份、不会漂。
#
# 为什么要拆两个入口:Docker 的 `registry-mirrors` 只接受 https(明文地址会
# 被 daemon 当成 insecure registry 拒绝),而本机自测/内网互调又不想折腾证书。
#
# 为什么本 server 不写 listen ... ssl:证书与域名属于部署环境(见 conf/tls/),
# 写死在这里会让「同一份 conf 换域名」变成改代码。
# ============================================================================
server {
listen 8080;
server_name _;
# registry 大 blob 直通,不设体积上限(0 = 不限制)
client_max_body_size 0;
# 请求体都是小 JSON / 空体,调大缓冲区让它留在内存里,避免刷临时文件
client_body_buffer_size 1m;
# 管理台 `location = /` 会 302 到 /admin。不关掉的话 nginx 默认写
# 绝对 URL + 实际 listen 端口,反代/端口映射后会把浏览器踢出链路。
absolute_redirect off;
port_in_redirect off;
include cache-routes.conf;
}