diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index bf9bbf1c..48739554 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osichat/__pycache__/consumers.cpython-310.pyc b/osinaweb/osichat/__pycache__/consumers.cpython-310.pyc index 56928ad8..921d42dd 100644 Binary files a/osinaweb/osichat/__pycache__/consumers.cpython-310.pyc and b/osinaweb/osichat/__pycache__/consumers.cpython-310.pyc differ diff --git a/osinaweb/osichat/consumers.py b/osinaweb/osichat/consumers.py index 7fb12063..3c1b91d4 100644 --- a/osinaweb/osichat/consumers.py +++ b/osinaweb/osichat/consumers.py @@ -10,7 +10,8 @@ import requests class OsitcomVisitor(WebsocketConsumer): def connect(self): self.accept() - ip_address = self.scope.get('headers', {}).get('x-forwarded-for', None) + headers = dict(self.scope.get('headers', [])) + ip_address = headers.get(b'x-forwarded-for', None) if ip_address: # Extract the actual IP address if there are multiple addresses self.visitor_ip = ip_address.split(',')[0].strip()