Manifest link; Removing .htaccess from build; Handling pusher IP when using proxy

This commit is contained in:
James Barnsley
2017-03-28 21:36:14 +13:00
parent 295d6ae8c1
commit 91fce2e4e2
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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
}

View File

@ -16,7 +16,7 @@
<link href="//fonts.googleapis.com/css?family=Archivo+Narrow:300,300i,400,400i,700" rel="stylesheet">
<link href="/iris/app.css" rel="stylesheet" />
<link rel="manifest" href="/iris/manifest.json">
<link rel="manifest" href="/iris/assets/manifest.json">
</head>
<body>