feat: improve mindspace asset handling and local runtime paths

This commit is contained in:
john
2026-06-28 12:18:26 +08:00
parent 4a9bc710f1
commit ea19ffb5fa
36 changed files with 867 additions and 100 deletions
+8 -8
View File
@@ -44,22 +44,22 @@ gadm.tkmind.cn {
}
}
# img.tkmind.cn:图片缓存与授权 (forward_auth → imgproxy)
# 在生产环境(105)上
# 1. TLS 证书指向实际的 .acme.sh 目录
# 2. forward_auth 指向 103 的授权端点
# 3. reverse_proxy 指向 103 imgproxy 进程
# img.tkmind.cn:图片缩放入口(当前真实运行位应在 103 / Studio
# 注意
# 1. 现有 signer 只生成签名路径,不会附带 asset_id query
# 2. 因此下面的 forward_auth 示例目前还不能直接用于“按资产鉴权”
# 3. 先确保 103 本机已有 imgproxy 监听 127.0.0.1:20081,再接入公网域名
img.tkmind.cn {
# 本地开发时如果没有证书,可注释掉 tls 行
# 生产证书路径按 103 当前 .acme.sh 实际位置填写
# tls /Users/john/.acme.sh/img.tkmind.cn_ecc/fullchain.cer /Users/john/.acme.sh/img.tkmind.cn_ecc/img.tkmind.cn.key
# forward_auth 检查图片访问权限
# 如果后续 signer URL 带上 asset_id,可启用这层鉴权
# forward_auth 127.0.0.1:8081 /api/mindspace/v1/authorize-image {
# uri /api/mindspace/v1/authorize-image?asset_id={query.asset_id}
# copy_headers X-Request-Id
# }
# reverse_proxy 到 imgproxy(生产在 103
# reverse_proxy 到 103 本机 imgproxy
# reverse_proxy 127.0.0.1:20081 {
# flush_interval -1
# }