follows redirects on checking robots.txt

This commit is contained in:
YeongJun 2024-11-30 23:31:30 +09:00 • committed by GitHub
commit d5bae8759f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,7 +74,9 @@ async def check_may_autonomously_fetch_url(url: AnyUrl | str, user_agent: str) -
async with AsyncClient() as client:
try:
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:
raise McpError(