mirror of
https://github.com/langchain-ai/mcpdoc.git
synced 2025-10-19 03:18:14 +03:00
chore: code cleaning
This commit is contained in:
@@ -270,7 +270,7 @@ def create_server(
|
||||
if match:
|
||||
redirect_url = match.group(1)
|
||||
new_url = urljoin(str(response.url), redirect_url)
|
||||
|
||||
|
||||
if "*" not in domains and not any(
|
||||
new_url.startswith(domain) for domain in domains
|
||||
):
|
||||
@@ -278,7 +278,7 @@ def create_server(
|
||||
"Error: Redirect URL not allowed. Must start with one of the following domains: "
|
||||
+ ", ".join(domains)
|
||||
)
|
||||
|
||||
|
||||
response = await httpx_client.get(new_url, timeout=timeout)
|
||||
response.raise_for_status()
|
||||
content = response.text
|
||||
|
||||
Reference in New Issue
Block a user