is_encrypted_file. Internal helper function. This docstring was added automatically to improve maintainability. Args: path: Parameter. Returns: Varies.
(path: str)
| 3691 | return ra |
| 3692 | |
| 3693 | # If loopback, allow reverse-proxy headers (cloudflared commonly sets one of these) |
| 3694 | for h in ("CF-Connecting-IP", "X-Real-IP"): |
| 3695 | v = (request.headers.get(h) or "").strip() |
| 3696 | if v: |
| 3697 | return v.split(",")[0].strip() |
| 3698 | xff = (request.headers.get("X-Forwarded-For") or "").strip() |
| 3699 | if xff: |
| 3700 | return xff.split(",")[0].strip() |
| 3701 | except Exception: |
| 3702 | pass |
| 3703 | return ra |
| 3704 | |
| 3705 | def _is_loopback(ip: str) -> bool: |
| 3706 | """_is_loopback. |
| 3707 | |
| 3708 | Internal helper function. |
| 3709 | |
| 3710 | This docstring was added automatically to improve maintainability. |
| 3711 | |
| 3712 | Args: |
| 3713 | ip: Parameter. |
no outgoing calls
no test coverage detected