mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 03:07:59 +08:00
fix: allow external knowledge api use simple host (#9966)
This commit is contained in:
parent
61ff2fd0f3
commit
eb69896355
@ -70,7 +70,7 @@ class ExternalDatasetService:
|
||||
|
||||
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}"})
|
||||
|
Loading…
Reference in New Issue
Block a user