1. add proxy config for summary API in vite config and nginx 2. implement SSE streaming parsing and text extraction utilities 3. add real-time summary component with typing animation and copy function
46 lines
1.2 KiB
Nginx Configuration File
46 lines
1.2 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# API 代理到 Gateway
|
|
location /api/ {
|
|
proxy_pass http://gateway:8080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
# 实时总结接口(外部 AI 总结服务,支持流式)
|
|
location /summary-api/ {
|
|
proxy_pass http://8.159.132.53:8000/api/summary/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_read_timeout 300s;
|
|
}
|
|
|
|
# 每日总结独立页面
|
|
location = /summary {
|
|
try_files /summary.html =404;
|
|
}
|
|
|
|
# 运营按手机号/微信号查询客户总结
|
|
location = /summary-search {
|
|
try_files /summary-search.html =404;
|
|
}
|
|
|
|
# 静态资源
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# 缓存静态资源
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|