mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 07:14:14 +00:00
Remove the truncation logic in the validate process
This commit is contained in:
@@ -88,10 +88,7 @@ def validate_url(url: str, default_url: str, allowed_schemes: tuple = ("https",
|
||||
if parsed.scheme not in allowed_schemes:
|
||||
raise ValueError(f"URL scheme must be one of: {', '.join(allowed_schemes)}")
|
||||
|
||||
# Reconstruct URL with only scheme, netloc (removing path, query, fragment)
|
||||
normalized_url = f"{parsed.scheme}://{parsed.netloc}"
|
||||
|
||||
return normalized_url
|
||||
return url
|
||||
|
||||
|
||||
def validate_url_with_path(url: str, default_url: str, required_suffix: str | None = None) -> str:
|
||||
|
||||
Reference in New Issue
Block a user