forked from ScoDoc/installmgr
retreive real client IP
This commit is contained in:
parent
803fc1b298
commit
4cda88ccbd
@ -34,7 +34,7 @@ def upload_dump():
|
||||
now = datetime.datetime.now()
|
||||
fulltime = now.isoformat()
|
||||
# client addr:
|
||||
remote_addr = request.environ.get("HTTP_X_FORWARDED_FOR", request.remote_addr)
|
||||
remote_addr = request.environ.get("HTTP_X_REAL_IP", request.remote_addr)
|
||||
log.write("{} request from {}\n".format(fulltime, remote_addr))
|
||||
# Avec seulement alphanum et tiret:
|
||||
clean_deptname = re.sub(r"[^A-Za-z-]", "", request.form["dept_name"])
|
||||
|
Loading…
Reference in New Issue
Block a user