Tighten local auth allow-list matching

This commit is contained in:
fawney19
2026-04-30 00:26:33 +08:00
parent 37392d8774
commit 9e2faa7e5b
10 changed files with 758 additions and 53 deletions

View File

@@ -7241,7 +7241,7 @@ async fn gateway_handles_users_me_providers_locally_without_proxying_upstream()
sample_endpoint(
"endpoint-claude-1",
"provider-claude",
"anthropic:messages",
"claude:messages",
"https://api.claude.example",
),
],

View File

@@ -294,7 +294,7 @@ async fn gateway_handles_admin_dashboard_stats_locally_without_proxying_upstream
"user".to_string(),
"local".to_string(),
Some(json!(["anthropic"])),
Some(json!(["anthropic:messages"])),
Some(json!(["claude:messages"])),
Some(json!(["claude-3-7"])),
Some(30),
None,
@@ -340,7 +340,7 @@ async fn gateway_handles_admin_dashboard_stats_locally_without_proxying_upstream
None,
Some("secondary".to_string()),
Some(json!(["anthropic"])),
Some(json!(["anthropic:messages"])),
Some(json!(["claude:messages"])),
Some(json!(["claude-3-7"])),
Some(60),
Some(5),