- 趋势窗口 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>
44 lines
1.3 KiB
Nginx Configuration File
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;
|
|
}
|
|
}
|