10c675d534
* add license header to modules * check license header at linting time
12 lines
320 B
Python
12 lines
320 B
Python
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
from urllib.parse import urlparse
|
|
|
|
|
|
def is_valid_http_url(url: str) -> bool:
|
|
"""Check if a URL is a valid HTTP/HTTPS URL."""
|
|
r = urlparse(url)
|
|
return all([r.scheme in ["http", "https"], r.netloc])
|