mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(anthropic): pin case-insensitive matching of WIF exchange-host allowlist entries
This commit is contained in:
parent
adc50b0f9e
commit
fd63ff1fa1
1 changed files with 5 additions and 0 deletions
|
|
@ -278,6 +278,11 @@ class TestExchangeHostTrust:
|
|||
monkeypatch.setenv("LITELLM_ANTHROPIC_WIF_ALLOWED_HOSTS", "gateway.internal:8443")
|
||||
assert self._mint("https://gateway.internal:8443", monkeypatch) == "https://gateway.internal:8443/v1/oauth/token"
|
||||
|
||||
def test_allowlist_matching_ignores_hostname_case(self, monkeypatch: pytest.MonkeyPatch):
|
||||
monkeypatch.setenv("LITELLM_ANTHROPIC_WIF_ALLOWED_HOSTS", "Gateway.Internal:8443")
|
||||
assert self._mint("https://gateway.internal:8443", monkeypatch) == "https://gateway.internal:8443/v1/oauth/token"
|
||||
assert self._mint("https://GATEWAY.internal:8443", monkeypatch) == "https://GATEWAY.internal:8443/v1/oauth/token"
|
||||
|
||||
|
||||
class TestBaseUrlDerivation:
|
||||
def _mint(self, api_base: str | None, monkeypatch: pytest.MonkeyPatch) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue