mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-29 13:31:00 +00:00
Fixed error with remote
This commit is contained in:
@@ -5,8 +5,8 @@ RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
|||||||
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
|
||||||
|
|
||||||
#Comment out the two folling lines when running server locally to fix issues with localhost
|
#Comment out the two folling lines when running server locally to fix issues with localhost
|
||||||
RewriteCond %{HTTPS} !=on
|
#RewriteCond %{HTTPS} !=on
|
||||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
|
||||||
|
|
||||||
|
|
||||||
RewriteRule ^remote/(.*) php/controller.php?id=$1 [L]
|
RewriteRule ^remote/(.*) php/controller.php?id=$1 [L]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var server;
|
|||||||
This if for the localhost running
|
This if for the localhost running
|
||||||
|
|
||||||
******/
|
******/
|
||||||
localhost = false;
|
localhost = true;
|
||||||
|
|
||||||
//https server
|
//https server
|
||||||
if(localhost)
|
if(localhost)
|
||||||
@@ -141,8 +141,9 @@ io.on('connection', function(socket){
|
|||||||
|
|
||||||
socket.on('id', function(arr)
|
socket.on('id', function(arr)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(arr.length == 3)
|
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)
|
socket.on('list', function(list)
|
||||||
@@ -152,8 +153,8 @@ io.on('connection', function(socket){
|
|||||||
in_list = true;
|
in_list = true;
|
||||||
list = list.split(',');
|
list = list.split(',');
|
||||||
coll = list[0].toLowerCase();
|
coll = list[0].toLowerCase();
|
||||||
//guid = list[1];
|
|
||||||
socket.join(coll);
|
socket.join(coll);
|
||||||
|
socket.join(rndName(socket.id, 10));
|
||||||
socket.emit("id", rndName(socket.id, 10));
|
socket.emit("id", rndName(socket.id, 10));
|
||||||
|
|
||||||
//console.log(name + " joined list " + coll);
|
//console.log(name + " joined list " + coll);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ socket.on(chan.toLowerCase(), function(msg){
|
|||||||
|
|
||||||
function channel_function(msg)
|
function channel_function(msg)
|
||||||
{
|
{
|
||||||
|
console.log(msg);
|
||||||
if(msg[0] == "list")
|
if(msg[0] == "list")
|
||||||
{
|
{
|
||||||
full_playlist = msg[1];
|
full_playlist = msg[1];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var id;
|
|||||||
|
|
||||||
$(document).ready(function (){
|
$(document).ready(function (){
|
||||||
setTimeout(function(){$("#code-input").focus();},500);
|
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];
|
id = window.location.pathname.split("/")[2];
|
||||||
if(id)
|
if(id)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user