mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Fixes a problem with the resource path of socket.io
This commit is contained in:
parent
068d174c58
commit
ac1858f8ec
2 changed files with 4 additions and 3 deletions
|
@ -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…
Reference in a new issue