mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-19 15:04:26 +01:00
minor style
This commit is contained in:
@@ -6,7 +6,6 @@ from urllib.parse import urlparse, urljoin
|
|||||||
|
|
||||||
cfg = Config()
|
cfg = Config()
|
||||||
|
|
||||||
|
|
||||||
# Function to check if the URL is valid
|
# Function to check if the URL is valid
|
||||||
def is_valid_url(url):
|
def is_valid_url(url):
|
||||||
try:
|
try:
|
||||||
@@ -21,7 +20,6 @@ def sanitize_url(url):
|
|||||||
|
|
||||||
# Define and check for local file address prefixes
|
# Define and check for local file address prefixes
|
||||||
def check_local_file_access(url):
|
def check_local_file_access(url):
|
||||||
# Define and check for local file address prefixes
|
|
||||||
local_prefixes = ['file:///', 'file://localhost', 'http://localhost', 'https://localhost']
|
local_prefixes = ['file:///', 'file://localhost', 'http://localhost', 'https://localhost']
|
||||||
return any(url.startswith(prefix) for prefix in local_prefixes)
|
return any(url.startswith(prefix) for prefix in local_prefixes)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user