mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-03 13:19:23 +08:00
Simplify docstrings.
This commit is contained in:
parent
7dba134cda
commit
9be31a4b7e
@ -3,7 +3,7 @@
|
||||
A single session reuses TLS handshakes and TCP connections across the probe
|
||||
and the many segment GETs to the same host (HuggingFace is the dominant
|
||||
case), which is a large speedup on cold connections and exactly the
|
||||
connection-reuse strategy that lets us match aria2c (PRD section 5.2).
|
||||
connection-reuse strategy that lets us match aria2c.
|
||||
|
||||
The connector uses :class:`ValidatingResolver` so every connection — initial
|
||||
or post-redirect — is screened for private/special-use IPs at connect time.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"""URL allowlist for server-side model fetches (PRD section 9.1).
|
||||
"""URL allowlist for server-side model fetches.
|
||||
|
||||
Default-deny. A URL is downloadable only when its parsed host + scheme are
|
||||
allowlisted AND (unless explicitly relaxed) its final filename ends in a
|
||||
@ -56,8 +56,8 @@ def _allowed_hosts() -> dict[str, set[str]]:
|
||||
def is_host_allowed(host: str | None, scheme: str | None) -> bool:
|
||||
"""True iff ``host`` is allowlisted for ``scheme``.
|
||||
|
||||
Used both for the initial URL and re-checked on every redirect hop
|
||||
(PRD section 9.2), so a whitelisted URL cannot 30x into an off-list host.
|
||||
Used both for the initial URL and re-checked on every redirect hop,
|
||||
so a whitelisted URL cannot 30x into an off-list host.
|
||||
"""
|
||||
if not host or not scheme:
|
||||
return False
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"""Path resolution + traversal safety for downloads (PRD section 9.3).
|
||||
"""Path resolution + traversal safety for downloads.
|
||||
|
||||
A ``model_id`` is a *relative destination path* of the form
|
||||
``<directory>/<filename>`` (e.g. ``loras/my_lora.safetensors``). This module
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"""SSRF / exfiltration defenses (PRD section 9.2).
|
||||
"""SSRF / exfiltration defenses.
|
||||
|
||||
Two cooperating layers:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user