This commit is contained in:
Timothy Jaeryang Baek
2026-04-21 16:04:48 +09:00
parent 0542df147a
commit 65f55847a1
+5
View File
@@ -172,6 +172,11 @@ def _is_text_content_type(content_type: str) -> bool:
def get_content_from_url(request, url: str) -> str:
from open_webui.retrieval.web.utils import validate_url
# Validate URL before making any request (blocks private IPs, non-HTTP, filter list)
validate_url(url)
# Streamed GET to check Content-Type without downloading the body.
try:
response = requests.get(url, stream=True, timeout=30)