Make sure check_website has an http or https scheme

This commit is contained in:
monosans
2024-04-11 23:12:00 +03:00
parent 186cadc764
commit 0050b08d87
+1 -1
View File
@@ -244,7 +244,7 @@ class Settings:
/,
) -> None:
parsed_url = urlparse(value)
if not parsed_url.scheme or not parsed_url.netloc:
if parsed_url.scheme not in {"http", "https"} or not parsed_url.netloc:
msg = f"invalid URL: {value}"
raise ValueError(msg)