mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: 优化验证器代码格式,提升可读性
This commit is contained in:
@@ -131,7 +131,7 @@ class ClaudeCodeValidator {
|
||||
const userAgent = req.headers['user-agent'] || ''
|
||||
const path = req.path || ''
|
||||
|
||||
const claudeCodePattern = /^claude-cli\/\d+\.\d+\.\d+/i;
|
||||
const claudeCodePattern = /^claude-cli\/\d+\.\d+\.\d+/i
|
||||
|
||||
if (!claudeCodePattern.test(userAgent)) {
|
||||
// 不是 Claude Code 的请求,此验证器不处理
|
||||
|
||||
Reference in New Issue
Block a user