Files

67 lines
1.9 KiB
Caddyfile
Raw Permalink Normal View History

{
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
}
}
}
2026-06-27 08:25:11 +08:00
# img.tkmind.cn:图片缩放入口(当前真实运行位应在 103 / Studio)
# 注意:
# 1. 现有 signer 只生成签名路径,不会附带 asset_id query
# 2. 因此下面的 forward_auth 示例目前还不能直接用于“按资产鉴权”
# 3. 先确保 103 本机已有 imgproxy 监听 127.0.0.1:20081,再接入公网域名
2026-06-27 08:25:11 +08:00
img.tkmind.cn {
# 生产证书路径按 103 当前 .acme.sh 实际位置填写
2026-06-27 08:25:11 +08:00
# tls /Users/john/.acme.sh/img.tkmind.cn_ecc/fullchain.cer /Users/john/.acme.sh/img.tkmind.cn_ecc/img.tkmind.cn.key
# 如果后续 signer URL 带上 asset_id,可启用这层鉴权
2026-06-27 08:25:11 +08:00
# 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 到 103 本机 imgproxy
2026-06-27 08:25:11 +08:00
# reverse_proxy 127.0.0.1:20081 {
# flush_interval -1
# }
}