diff --git a/backend/app/pypi_proxy.py b/backend/app/pypi_proxy.py index 287426d..87678eb 100644 --- a/backend/app/pypi_proxy.py +++ b/backend/app/pypi_proxy.py @@ -525,6 +525,9 @@ def _cache_dependency_background( normalized_name = re.sub(r'[-_.]+', '-', dep_name).lower() # First, get the simple index page to find available versions + # Use HTTPS explicitly to avoid redirect issues that can drop trailing slashes + if base_url.startswith('http://'): + base_url = 'https://' + base_url[7:] simple_url = f"{base_url}/pypi/simple/{normalized_name}/" logger.info(f"PyPI proxy: proactively caching {dep_name} (depth={depth})")