refactor: optimize security baseline, task logging, frontend maven packaging, and redirect root page to v2
This commit is contained in:
@@ -30,13 +30,18 @@ mvn spring-boot:run -Dspring-boot.run.mainClass=com.svnlog.web.WebApplication
|
||||
|
||||
## DeepSeek API Key 读取优先级
|
||||
|
||||
1. 请求中的 `apiKey`
|
||||
1. 请求中的 `apiKey`(临时传入,优先级最高)
|
||||
2. 设置页保存的运行时 `apiKey`
|
||||
3. 环境变量 `DEEPSEEK_API_KEY`
|
||||
|
||||
> **首次启动未配置 API Key 是正常状态。**
|
||||
> `/api/settings` 会返回 `apiKeyConfigured: false`,
|
||||
> 请前往「系统设置」页面填写 API Key 后保存,或通过环境变量注入。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 不要在源码和日志中写入真实密钥
|
||||
- 使用环境变量注入密钥是更安全的做法(尤其在 Docker/CI 环境中)
|
||||
- DeepSeek 模式需要可访问 DeepSeek API 的网络环境
|
||||
- OpenAI 兼容模式要求兼容服务提供 `/chat/completions` 流式接口
|
||||
- 接口调用可能产生费用,建议控制调用频率
|
||||
|
||||
Reference in New Issue
Block a user