retreive real client IP

This commit is contained in:
Emmanuel Viennet 2021-09-18 22:43:04 +02:00
parent b77934e346
commit 7d399e63dc

View File

@ -42,7 +42,7 @@ def upload_dump():
clean_deptname = re.sub(r"[^A-Za-z-]", "", request.form["dept_name"]) clean_deptname = re.sub(r"[^A-Za-z-]", "", request.form["dept_name"])
the_file = request.files["file"] the_file = request.files["file"]
filename = the_file.filename filename = the_file.filename
data = the_file.file.read() data = the_file.read()
try: try:
remote_host = socket.gethostbyaddr(remote_addr)[0] remote_host = socket.gethostbyaddr(remote_addr)[0]