mirror of
https://github.com/linshenkx/prompt-optimizer.git
synced 2026-05-06 21:50:27 +08:00
refactor: 完全移除 Vercel/Docker 代理功能以修复 SSRF 安全漏洞
修复 #179 ## 变更内容 ### 核心代码清理 (-2473行) - 删除 api/proxy.js、api/stream.js、api/vercel-status.js 端点 - 删除 node-proxy/ 服务器实现 - 移除 environment.ts 中的代理检测逻辑 - 简化所有图像适配器和 LLM 服务,直接使用 baseURL - 移除模型配置中的 useVercelProxy/useDockerProxy 字段 ### 基础设施更新 - 更新 Dockerfile 移除 node-proxy 构建 - 更新 nginx.conf 移除代理路由 - 更新 supervisord.conf 移除 node-proxy 进程 ### UI 优化 - 移除模型管理界面中的代理选项 - 清理国际化文件中的代理相关翻译 - 删除备份文件 ModelManager.bak.vue ### 文档同步 - 更新技术开发指南,说明功能移除原因 - 更新 Vercel 部署文档,移除代理相关说明 - 更新图像模式文档 ## 安全说明 由于内置代理存在 SSRF (服务端请求伪造) 安全风险,完全移除相关功能。 推荐用户使用: 1. 桌面版应用 (无跨域限制) 2. 自建反向代理 (完全控制) 3. LLM 提供商的 CORS 友好端点 ## 向后兼容性 历史数据中的 useVercelProxy/useDockerProxy 字段为可选,不会导致破坏性变更。
This commit is contained in:
@@ -117,7 +117,6 @@ Prompt Optimizer在Vercel部署时支持使用Edge Runtime代理解决跨域问
|
||||
|
||||
3. **"使用Vercel代理"选项未显示**
|
||||
- 如使用导入部署:检查是否已清空根目录设置并重新部署
|
||||
- 验证`/api/vercel-status`路径是否可访问(可通过浏览器访问`你的域名/api/vercel-status`测试)
|
||||
- 查看部署日志中是否有关于Function的错误信息
|
||||
|
||||
4. **如何更新已部署的项目**
|
||||
|
||||
@@ -117,7 +117,6 @@ Prompt Optimizer supports using Edge Runtime proxy to solve cross-origin issues
|
||||
|
||||
3. **"Use Vercel Proxy" option not displayed**
|
||||
- If using import deployment: check if you have cleared the root directory setting and redeployed
|
||||
- Verify if the `/api/vercel-status` path is accessible (you can test by visiting `your-domain/api/vercel-status` in a browser)
|
||||
- Check if there are any Function-related error messages in the deployment logs
|
||||
|
||||
4. **How to update a deployed project**
|
||||
@@ -127,4 +126,4 @@ Prompt Optimizer supports using Edge Runtime proxy to solve cross-origin issues
|
||||
5. **How to add a custom domain**
|
||||
- Select "Domains" in the Vercel project settings
|
||||
- Add and verify your domain
|
||||
- Follow the guidance to configure DNS records
|
||||
- Follow the guidance to configure DNS records
|
||||
|
||||
Reference in New Issue
Block a user