diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js index 33abd1318..3fc4d45fc 100644 --- a/src/static/js/admin/plugins.js +++ b/src/static/js/admin/plugins.js @@ -7,11 +7,10 @@ $(document).ready(() => { const pathComponents = location.pathname.split('/'); // Strip admin/plugins const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`; - const resource = `${baseURL.substring(1)}socket.io`; // connect const room = `${url}pluginfw/installer`; - const socket = io.connect(room, {path: `${baseURL}socket.io`, resource}); + const socket = io.connect(room, {path: `${baseURL}socket.io`}); const search = (searchTerm, limit) => { if (search.searchTerm !== searchTerm) { diff --git a/src/static/js/admin/settings.js b/src/static/js/admin/settings.js index 6ebc5336d..e54bef3d8 100644 --- a/src/static/js/admin/settings.js +++ b/src/static/js/admin/settings.js @@ -7,11 +7,10 @@ $(document).ready(() => { const pathComponents = location.pathname.split('/'); // Strip admin/plugins const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`; - const resource = `${baseURL.substring(1)}socket.io`; // connect const room = `${url}settings`; - const socket = io.connect(room, {path: `${baseURL}socket.io`, resource}); + const socket = io.connect(room, {path: `${baseURL}socket.io`}); socket.on('settings', (settings) => { /* Check whether the settings.json is authorized to be viewed */ diff --git a/src/static/js/pad.js b/src/static/js/pad.js index c19bd58ea..0656005f8 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -223,13 +223,10 @@ const handshake = () => { const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port; // create the url const url = `${loc.protocol}//${loc.hostname}:${port}/`; - // find out in which subfolder we are - const resource = `${exports.baseURL.substring(1)}socket.io`; // connect socket = pad.socket = io.connect(url, { // Allow deployers to host Etherpad on a non-root path path: `${exports.baseURL}socket.io`, - resource, reconnectionAttempts: 5, reconnection: true, reconnectionDelay: 1000, diff --git a/src/static/js/timeslider.js b/src/static/js/timeslider.js index f171ead99..82ecd2fd3 100644 --- a/src/static/js/timeslider.js +++ b/src/static/js/timeslider.js @@ -56,11 +56,9 @@ const init = () => { const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port; // create the url const url = `${loc.protocol}//${loc.hostname}:${port}/`; - // find out in which subfolder we are - const resource = `${exports.baseURL.substring(1)}socket.io`; // build up the socket io connection - socket = io.connect(url, {path: `${exports.baseURL}socket.io`, resource}); + socket = io.connect(url, {path: `${exports.baseURL}socket.io`}); // send the ready message once we're connected socket.on('connect', () => {