Files
memind/scripts/g2-lb.Caddyfile
T
john a2374c3cd6 chore: Update configs and build files
- .gitignore 更新
- Caddyfile LB 配置更新
- WeChat MP 菜单脚本更新
- package-lock.json 更新
2026-06-27 08:25:11 +08:00

67 lines
1.7 KiB
Caddyfile
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.
{
admin off
email admin@tkmind.cn
http_port 8090
https_port 8444
}
# m.tkmind.cn:公网入口转发到 Studio 本机 H5 (:8081)
# 证书:acme.sh DNS-01 + 阿里云 API,自动续期
m.tkmind.cn {
tls /Users/john/.acme.sh/m.tkmind.cn_ecc/fullchain.cer /Users/john/.acme.sh/m.tkmind.cn_ecc/m.tkmind.cn.key
reverse_proxy 127.0.0.1:8081 {
header_down +X-Memind-Upstream {http.reverse_proxy.upstream.hostport}
flush_interval -1
transport http {
read_timeout 0
write_timeout 0
}
}
}
plaza.tkmind.cn {
tls /Users/john/.acme.sh/plaza.tkmind.cn_ecc/fullchain.cer /Users/john/.acme.sh/plaza.tkmind.cn_ecc/plaza.tkmind.cn.key
reverse_proxy 127.0.0.1:3001 {
flush_interval -1
transport http {
read_timeout 0
write_timeout 0
}
}
}
gadm.tkmind.cn {
tls /Users/john/.acme.sh/gadm.tkmind.cn_ecc/fullchain.cer /Users/john/.acme.sh/gadm.tkmind.cn_ecc/gadm.tkmind.cn.key
reverse_proxy 127.0.0.1:5174 {
flush_interval -1
transport http {
read_timeout 0
write_timeout 0
}
}
}
# img.tkmind.cn:图片缓存与授权 (forward_auth → imgproxy)
# 在生产环境(105)上:
# 1. TLS 证书指向实际的 .acme.sh 目录
# 2. forward_auth 指向 103 的授权端点
# 3. reverse_proxy 指向 103 的 imgproxy 进程
img.tkmind.cn {
# 本地开发时如果没有证书,可注释掉 tls 行
# 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 检查图片访问权限
# 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 127.0.0.1:20081 {
# flush_interval -1
# }
}