MCPcopy Index your code
hub / github.com/github/spec-kit / _require_https

Function _require_https

src/specify_cli/commands/bundle/__init__.py:788–798  ·  view source on GitHub ↗
(label: str, url: str)

Source from the content-addressed store, hash-verified

786
787
788def _require_https(label: str, url: str) -> None:
789 from urllib.parse import urlparse
790
791 parsed = urlparse(url)
792 is_localhost = parsed.hostname in ("localhost", "127.0.0.1", "::1")
793 if parsed.scheme != "https" and not (parsed.scheme == "http" and is_localhost):
794 raise BundlerError(
795 f"Refusing to download {label} over non-HTTPS URL: {url}"
796 )
797 if not parsed.hostname:
798 raise BundlerError(f"Refusing to download {label} from URL with no host: {url}")
799
800
801def _download_remote_manifest(entry_id: str, url: str):

Callers 2

_validate_redirectFunction · 0.85

Calls 1

BundlerErrorClass · 0.85

Tested by

no test coverage detected