ai模块修改

This commit is contained in:
2025-12-15 15:26:05 +08:00
parent 3767150fd6
commit 8a03ede7dc
56 changed files with 3403 additions and 1119 deletions

View File

@@ -0,0 +1,51 @@
# Dify 服务代理配置
# Dify Web 前端
location /dify/ {
proxy_pass http://dify-web: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;
proxy_set_header X-Forwarded-Proto $scheme;
# 支持 WebSocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# 超时配置
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# Dify API
location /dify/api/ {
proxy_pass http://dify-api:5001/;
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_set_header X-Forwarded-Proto $scheme;
# 支持 WebSocket (SSE)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# 超时配置AI 响应可能较慢)
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
# 禁用缓冲(支持流式响应)
proxy_buffering off;
}
# Dify App (公开应用)
location /dify/app/ {
proxy_pass http://dify-web:3000/app/;
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_set_header X-Forwarded-Proto $scheme;
}