Is there a way to know the lan IP request client?. I am work in django, I tried this:
def get_ip_test():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
# doesn't even have to be reachable
s.connect(('8.8.8.8', 0))
IP = s.getsockname()[0]
except:
IP = '127.0.0.1'
finally:
s.close()
return IP
But this return IP from server, I saw in javascript an example to get LAN IP example javascript
Many thanks for your help.