()
| 7 | |
| 8 | |
| 9 | def _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 | |
| 16 | def _is_trusted_proxy(host: str) -> bool: |