fix: 优化验证器代码格式,提升可读性

This commit is contained in:
sususu
2025-10-17 15:30:05 +08:00
parent b0917b75a4
commit 77bca73094
3 changed files with 6 additions and 3 deletions

View File

@@ -53,7 +53,8 @@ class CodexCliValidator {
// 2. 对于特定路径,进行额外的严格验证
// 对于 /openai 和 /azure 路径需要完整验证
const strictValidationPaths = ['/openai', '/azure']
const needsStrictValidation = req.path && strictValidationPaths.some(path => req.path.startsWith(path))
const needsStrictValidation =
req.path && strictValidationPaths.some((path) => req.path.startsWith(path))
if (!needsStrictValidation) {
// 其他路径,只要 User-Agent 匹配就认为是 Codex CLI