retreive real client IP
This commit is contained in:
parent
c4c37fedfb
commit
c5e5e02639
@ -138,11 +138,12 @@ def version():
|
|||||||
"""
|
"""
|
||||||
echo -e "DATE\tIP\tSVN\tSERIAL\tOP" > installs.log; chown scodoc installs.log
|
echo -e "DATE\tIP\tSVN\tSERIAL\tOP" > installs.log; chown scodoc installs.log
|
||||||
"""
|
"""
|
||||||
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
|
svn = request.args.get("svn", "-") # installed subversion (ScoDoc 7)
|
||||||
commit = request.args.get("commit", "-") # installed git commit
|
release = request.args.get("release", "") # ScoDoc 9 prod installs
|
||||||
|
commit = request.args.get("commit", "") # installed git commit (devs)
|
||||||
if mode == "install" or not sn:
|
if mode == "install" or not sn:
|
||||||
serial = increment()
|
serial = increment()
|
||||||
else:
|
else:
|
||||||
@ -154,7 +155,7 @@ def version():
|
|||||||
% (
|
% (
|
||||||
time.strftime("%Y-%m-%d %H:%M:%S"),
|
time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
remote_addr,
|
remote_addr,
|
||||||
svn or commit,
|
svn or commit or release or "-",
|
||||||
serial,
|
serial,
|
||||||
mode,
|
mode,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user