Answers for "how to track ip address for client of site django"

0

get ip address in django

request.META.get("REMOTE_ADDR")
Posted by: Guest on April-26-2021
0

visitor IP address django

def visitor_ip_address(request):

    x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')

    if x_forwarded_for:
        return x_forwarded_for.split(',')[0]
    return request.META.get('REMOTE_ADDR')
Posted by: Guest on July-13-2021

Code answers related to "how to track ip address for client of site django"

Python Answers by Framework

Browse Popular Code Answers by Language