retreive real client IP
This commit is contained in:
parent
d43407bb6a
commit
af888970f2
@ -141,7 +141,7 @@ def version():
|
|||||||
remote_addr = request.environ.get("HTTP_X_REAL_IP", request.remote_addr)
|
remote_addr = request.environ.get("HTTP_X_REAL_IP", request.remote_addr)
|
||||||
mode = request.args.get("mode", "?")
|
mode = request.args.get("mode", "?")
|
||||||
sn = request.args.get("sn", "-1") # serial number
|
sn = request.args.get("sn", "-1") # serial number
|
||||||
svn = request.args.get("svn", "-") # installed subversion (ScoDoc 7)
|
svn = request.args.get("svn", "") # installed subversion (ScoDoc 7)
|
||||||
release = request.args.get("release", "") # ScoDoc 9 prod installs
|
release = request.args.get("release", "") # ScoDoc 9 prod installs
|
||||||
commit = request.args.get("commit", "") # installed git commit (devs)
|
commit = request.args.get("commit", "") # installed git commit (devs)
|
||||||
if mode == "install" or not sn:
|
if mode == "install" or not sn:
|
||||||
@ -151,9 +151,8 @@ def version():
|
|||||||
|
|
||||||
f = open(DIR + "installs.log", "a")
|
f = open(DIR + "installs.log", "a")
|
||||||
f.write(
|
f.write(
|
||||||
"%s\%s\t%s\t%s\t%s\t%s\n"
|
"%s\t%s\t%s\t%s\t%s\n"
|
||||||
% (
|
% (
|
||||||
request.environ,
|
|
||||||
time.strftime("%Y-%m-%d %H:%M:%S"),
|
time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
remote_addr,
|
remote_addr,
|
||||||
svn or commit or release or "-",
|
svn or commit or release or "-",
|
||||||
|
Loading…
Reference in New Issue
Block a user