Manifest link; Removing .htaccess from build; Handling pusher IP when using proxy
This commit is contained in:
6
build.sh
6
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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user