MCPcopy
hub / github.com/bugy/script-server / get_proxied_ip

Function get_proxied_ip

src/utils/tornado_utils.py:86–91  ·  view source on GitHub ↗
(request_handler)

Source from the content-addressed store, hash-verified

84
85
86def get_proxied_ip(request_handler):
87 forwarded_for = request_handler.request.headers.get('X-Forwarded-For', None)
88 if forwarded_for:
89 return forwarded_for
90
91 return request_handler.request.headers.get('X-Real-IP', None)
92
93
94def get_secure_cookie(request_handler, key):

Callers 1

get_all_audit_namesFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected