Files
agent-fox/packages/web/nginx.conf
YANG JIANKUAN 65e4e6778d fix: 修复调用趋势统计与图表渲染,柱状图改为平滑折线图
- 趋势窗口 off-by-one:窗口不含当天,当天调用永远不进图表;
  改为以 UTC 日界、包含今天的 N 天窗口
- BarChart 容器 items-end 导致列高塌缩,柱子百分比高度恒为 0,
  图表自组件抽取以来从未渲染;重写为 LineChart(单调三次样条
  平滑曲线 + 面积填充 + 十字线 tooltip + 键盘导航)
- nginx 为 index.html 增加 no-cache、/assets/ 增加 immutable
  缓存,避免发版后浏览器沿用旧 bundle

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 11:59:27 +08:00

44 lines
1.3 KiB
Nginx Configuration File

server {
listen 80;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://server:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /mcp/ {
proxy_pass http://mcp:3001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_buffering off;
proxy_cache off;
}
location /docs/ {
proxy_pass http://docs:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Hashed build artifacts are safe to cache forever
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
location / {
# index.html must always revalidate, or browsers keep a stale
# bundle reference after each deploy (heuristic caching)
add_header Cache-Control "no-cache";
try_files $uri $uri/ /index.html;
}
}