diff --git a/mopidy_iris/__init__.py b/mopidy_iris/__init__.py index 7afb65a8..0242910d 100755 --- a/mopidy_iris/__init__.py +++ b/mopidy_iris/__init__.py @@ -12,7 +12,7 @@ from handlers import WebsocketHandler, HttpHandler from core import IrisCore logger = logging.getLogger(__name__) -__version__ = '2.13.9' +__version__ = '2.13.10' ## # Core extension class diff --git a/mopidy_iris/handlers.py b/mopidy_iris/handlers.py index 409abaf8..67f7791a 100755 --- a/mopidy_iris/handlers.py +++ b/mopidy_iris/handlers.py @@ -44,9 +44,9 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler): created = datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S') # get our IP - # if it's local, then use our proxy origin + # if it's local, then check for proxy origin ip = self.request.remote_ip - if (ip == '127.0.0.1'): + if (ip == '127.0.0.1' and hasattr(self.request.headers,'X-Forwarded-For')): ip = self.request.headers['X-Forwarded-For'] # construct our client object, and add to our list of connections