mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-04 19:56:37 +02:00
Fixes a problem with the resource path of socket.io
This commit is contained in:
parent
068d174c58
commit
ac1858f8ec
@ -66,8 +66,9 @@ function handshake()
|
||||
//create the url
|
||||
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
||||
//find out in which subfolder we are
|
||||
var resource = loc.pathname.substring(0,loc.pathname.indexOf("/p/")) + "/socket.io";
|
||||
|
||||
console.log(loc.pathname);
|
||||
var resource = loc.pathname.substr(1,loc.pathname.indexOf("/p/")) + "socket.io";
|
||||
console.log(resource);
|
||||
//connect
|
||||
socket = io.connect(url, {resource: resource});
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
//create the url
|
||||
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
||||
//find out in which subfolder we are
|
||||
var resource = loc.pathname.substring(0,loc.pathname.indexOf("/p/")) + "/socket.io";
|
||||
var resource = loc.pathname.substr(1,loc.pathname.indexOf("/p/")) + "socket.io";
|
||||
|
||||
//build up the socket io connection
|
||||
socket = io.connect(url, {resource: resource});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user