679fa31ce3
架构变更:
旧架构:浏览器 → 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>