Files
leaudit-platform-frontend/app
TanWenyan 679fa31ce3 重构:客户端直接调用FastAPI后端,不再通过Remix中转
架构变更:
旧架构:浏览器 → Remix /api/* → dify-client.server → FastAPI /dify → Dify
新架构:浏览器 → FastAPI /dify/* → Dify

修改:
1. app/config/chat.ts
   - getApiBaseUrl() 根据端口映射返回FastAPI后端地址
   - 端口映射表:
     * 51703 → http://172.16.0.55:8073
     * 51704 → http://10.79.97.17:8001
     * 51705 → http://10.79.97.17:8002
     * 51706 → http://10.79.97.17:8003
     * 51707 → http://10.79.97.17:8004
     * 51708 → http://10.79.97.17:8005
   - API_URL: `${baseUrl}/dify`

示例(端口51703):
- 浏览器Network: http://172.16.0.55:8073/dify/chat-messages
- 不再经过Remix API routes

注意:
- 需要FastAPI配置CORS允许跨域
- Cookie需要在跨域情况下正确传递

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 14:44:49 +08:00
..
2025-04-09 01:34:14 +08:00
2025-06-04 11:25:53 +08:00