MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / get_client_ip

Function get_client_ip

dispatcharr/utils.py:31–32  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

29
30
31def get_client_ip(request):
32 return request.META.get("HTTP_X_REAL_IP") or request.META.get("REMOTE_ADDR")
33
34
35def network_access_allowed(request, settings_key, user=None):

Callers 2

checkMethod · 0.90
network_access_allowedFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected