From a5777683f354c80e66a29c7e05ad6436bb5b1a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Mon, 21 Oct 2024 18:44:25 +0800 Subject: [PATCH] fix: when upload file response 3** will raise error (#9555) --- api/factories/file_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/factories/file_factory.py b/api/factories/file_factory.py index 91b188270a..eac5090c2b 100644 --- a/api/factories/file_factory.py +++ b/api/factories/file_factory.py @@ -177,7 +177,7 @@ def _build_from_remote_url( url = mapping.get("url") if not url: raise ValueError("Invalid file url") - resp = ssrf_proxy.head(url) + resp = ssrf_proxy.head(url, follow_redirects=True) resp.raise_for_status() # Try to extract filename from response headers or URL