MCPcopy
hub / github.com/benoitc/gunicorn / proxy_protocol_access_check

Method proxy_protocol_access_check

gunicorn/http/message.py:659–664  ·  view source on GitHub ↗

Check if proxy protocol is allowed from this peer.

(self)

Source from the content-addressed store, hash-verified

657 return buf
658
659 def proxy_protocol_access_check(self):
660 """Check if proxy protocol is allowed from this peer."""
661 if (isinstance(self.peer_addr, tuple) and
662 not _ip_in_allow_list(self.peer_addr[0], self.cfg.proxy_allow_ips,
663 self.cfg.proxy_allow_networks())):
664 raise ForbiddenProxyRequest(self.peer_addr[0])
665
666 def _parse_proxy_protocol_v1(self, unreader, buf):
667 """Parse PROXY protocol v1 (text format).

Callers 1

Calls 3

_ip_in_allow_listFunction · 0.85
proxy_allow_networksMethod · 0.80

Tested by

no test coverage detected