diff --git a/build.sh b/build.sh
index 9e48d57f..949a722d 100755
--- a/build.sh
+++ b/build.sh
@@ -1,13 +1,7 @@
#!/bin/bash
-if [ ! -d public_html ]; then
- echo -e Creating mopidy_iris/static folder
- ln -s mopidy_iris/static public_html
-fi
-
# copy assets
echo -e Copying assets $SERVER
-cp src/.htaccess mopidy_iris/static/.htaccess
rsync -avrs src/assets/ mopidy_iris/static/assets/ 2>&1 >/dev/null
# create HTML files
diff --git a/mopidy_iris/handlers.py b/mopidy_iris/handlers.py
index c1464e2e..9529ec40 100755
--- a/mopidy_iris/handlers.py
+++ b/mopidy_iris/handlers.py
@@ -43,12 +43,18 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
username = protocolElements['username']
created = datetime.strftime(datetime.now(), '%Y-%m-%d %H:%M:%S')
+ # get our IP
+ # if it's local, then use our proxy origin
+ ip = self.request.remote_ip
+ if (ip == '127.0.0.1'):
+ ip = self.request.headers['X-Forwarded-For']
+
# construct our client object, and add to our list of connections
client = {
'clientid': clientid,
'connection_id': connection_id,
'username': username,
- 'ip': self.request.remote_ip,
+ 'ip': ip,
'created': created
}
diff --git a/src/index.html b/src/index.html
index 3e6adb09..ecbc0295 100755
--- a/src/index.html
+++ b/src/index.html
@@ -16,7 +16,7 @@
-
+