This repository has been archived on 2026-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Cyrene/Caddyfile
T

46 lines
1012 B
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.
# Caddyfile — Cyrene AI 助手平台反向代理
# Caddy version: 2.x
# 环境变量: DOMAIN, ACME_EMAIL
{
email {$ACME_EMAIL:admin@localhost}
admin off
}
# 站点(DOMAIN 未设置时回退到 :80 HTTP
{$DOMAIN::80} {
log {
output stdout
format json
}
header {
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
X-XSS-Protection "1; mode=block"
Referrer-Policy "strict-origin-when-cross-origin"
# 生产环境有域名时取消注释
# Strict-Transport-Security "max-age=31536000; includeSubDomains"
Strict-Transport-Security "max-age=31536000; includeSubDomains"
}
# WebSocket 路由
handle_path /ws/* {
reverse_proxy gateway:8080
}
# API 路由 → Gateway
handle_path /api/* {
reverse_proxy gateway:8080 {
header_up Host {http.request.host}
header_up X-Forwarded-For {http.request.remote.host}
header_up X-Forwarded-Proto {http.request.scheme}
}
}
# 前端静态文件
handle {
respond "Cyrene AI Platform Frontend coming soon." 200
}
}