Remove the truncation logic in the validate process

pull/22766/head
chenguowei 9 months ago
parent c2c69ffb82
commit b5251c1d63

@ -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:

Loading…
Cancel
Save