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

Function proxy_environ

gunicorn/http/wsgi.py:104–116  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

102
103
104def proxy_environ(req):
105 info = req.proxy_protocol_info
106
107 if not info:
108 return {}
109
110 return {
111 "PROXY_PROTOCOL": info["proxy_protocol"],
112 "REMOTE_ADDR": info["client_addr"],
113 "REMOTE_PORT": str(info["client_port"]),
114 "PROXY_ADDR": info["proxy_addr"],
115 "PROXY_PORT": str(info["proxy_port"]),
116 }
117
118
119def _make_early_hints_callback(req, sock, resp):

Callers 1

createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected