Fixed error with remote

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-14 02:51:50 +02:00
parent 28bd070b98
commit a4bb62afb0
4 changed files with 8 additions and 6 deletions

View File

@@ -5,8 +5,8 @@ RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
#Comment out the two folling lines when running server locally to fix issues with localhost
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^remote/(.*) php/controller.php?id=$1 [L]

View File

@@ -4,7 +4,7 @@ var server;
This if for the localhost running
******/
localhost = false;
localhost = true;
//https server
if(localhost)
@@ -141,8 +141,9 @@ io.on('connection', function(socket){
socket.on('id', function(arr)
{
if(arr.length == 3)
io.to(coll).emit(arr[0], [arr[1], arr[2]]);
io.to(arr[0]).emit(arr[0], [arr[1], arr[2]]);
});
socket.on('list', function(list)
@@ -152,8 +153,8 @@ io.on('connection', function(socket){
in_list = true;
list = list.split(',');
coll = list[0].toLowerCase();
//guid = list[1];
socket.join(coll);
socket.join(rndName(socket.id, 10));
socket.emit("id", rndName(socket.id, 10));
//console.log(name + " joined list " + coll);

View File

@@ -21,6 +21,7 @@ socket.on(chan.toLowerCase(), function(msg){
function channel_function(msg)
{
console.log(msg);
if(msg[0] == "list")
{
full_playlist = msg[1];

View File

@@ -4,7 +4,7 @@ var id;
$(document).ready(function (){
setTimeout(function(){$("#code-input").focus();},500);
socket = io.connect('https://'+window.location.hostname+':3000');
socket = io.connect('//'+window.location.hostname+':3000');
id = window.location.pathname.split("/")[2];
if(id)
{