Skip to content

Commit

Permalink
fix: allow external knowledge api use simple host (#9966)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjlarry authored Oct 29, 2024
1 parent 61ff2fd commit eb69896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/services/external_knowledge_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def check_endpoint_and_api_key(settings: dict):

endpoint = f"{settings['endpoint']}/retrieval"
api_key = settings["api_key"]
if not validators.url(endpoint):
if not validators.url(endpoint, simple_host=True):
raise ValueError(f"invalid endpoint: {endpoint}")
try:
response = httpx.post(endpoint, headers={"Authorization": f"Bearer {api_key}"})
Expand Down

0 comments on commit eb69896

Please sign in to comment.