MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / _iter_trusted_proxies

Function _iter_trusted_proxies

apps/base/dependencies.py:9–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8
9def _iter_trusted_proxies() -> Iterable[str]:
10 trusted_proxies = getattr(settings, "trustedProxies", [])
11 if isinstance(trusted_proxies, str):
12 trusted_proxies = [item.strip() for item in trusted_proxies.split(",")]
13 return [item for item in trusted_proxies if item]
14
15
16def _is_trusted_proxy(host: str) -> bool:

Callers 1

_is_trusted_proxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected