mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-20 21:05:17 +02:00
follows redirects on checking robots.txt
This commit is contained in:
@@ -74,7 +74,9 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) -
|
|||||||
async with AsyncClient() as client:
|
async with AsyncClient() as client:
|
||||||
try:
|
try:
|
||||||
response = await client.get(
|
response = await client.get(
|
||||||
robot_txt_url, headers={"User-Agent": user_agent}
|
robot_txt_url,
|
||||||
|
follow_redirects=True,
|
||||||
|
headers={"User-Agent": user_agent},
|
||||||
)
|
)
|
||||||
except HTTPError:
|
except HTTPError:
|
||||||
raise McpError(
|
raise McpError(
|
||||||
|
|||||||
Reference in New Issue
Block a user