web2py sitting behind load balancer showing lb IP not client IP, thanks Dave Stoll

This commit is contained in:
Massimo Di Pierro
2011-12-31 12:28:17 -06:00
parent a697af13ac
commit 23223157d0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2011-12-31 12:03:17) stable
Version 1.99.4 (2011-12-31 12:28:04) stable
+1 -1
View File
@@ -551,7 +551,7 @@ class Session(Storage):
(record_id_name, table, record_id, unique_key) = \
response._dbtable_and_field
dd = dict(locked=False, client_ip=request.env.remote_addr,
dd = dict(locked=False, client_ip=request.client.replace(':','.'),
modified_datetime=request.now,
session_data=cPickle.dumps(dict(self)),
unique_key=unique_key)