Files
droid2api/docker-compose.yml
Claude Code dec2f26b5c fix: 修复 system 提示词中敏感词导致的 403 错误
- 修改 docker-compose.yml:将宿主机端口从 3000 改为 3001
- 修改 routes.js:增强 system 字段过滤逻辑,过滤所有项中的敏感词
- 修改 transformers/request-anthropic.js:添加 filterSensitiveKeywords 函数
- 修改 user-agent-updater.js:优化错误日志输出,增加超时时间

过滤规则:
- "Claude Code" → "AI Assistant"
- "Claude" → "AI"
- "Anthropic" → "Factory"

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 18:56:26 +00:00

26 lines
782 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
droid2api:
build: .
container_name: droid2api
ports:
- "3001:3000"
environment:
# 认证配置(按优先级选择其一):
# 最高优先级固定API密钥推荐用于生产环境
- FACTORY_API_KEY=${FACTORY_API_KEY}
# 次优先级refresh token自动刷新机制
- DROID_REFRESH_KEY=${DROID_REFRESH_KEY}
# 可选如果需要修改端口在config.json中配置
volumes:
# 可选持久化auth.json以保存刷新的tokens
- ./data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s