mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
socket.io: Delete ignored resource
option
I couldn't find any reference to a `resource` option in either the socket.io-client documentation or its source code.
This commit is contained in:
parent
7949219179
commit
7eb0f996c3
4 changed files with 3 additions and 10 deletions
|
@ -7,11 +7,10 @@ $(document).ready(() => {
|
||||||
const pathComponents = location.pathname.split('/');
|
const pathComponents = location.pathname.split('/');
|
||||||
// Strip admin/plugins
|
// Strip admin/plugins
|
||||||
const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`;
|
const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`;
|
||||||
const resource = `${baseURL.substring(1)}socket.io`;
|
|
||||||
|
|
||||||
// connect
|
// connect
|
||||||
const room = `${url}pluginfw/installer`;
|
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) => {
|
const search = (searchTerm, limit) => {
|
||||||
if (search.searchTerm !== searchTerm) {
|
if (search.searchTerm !== searchTerm) {
|
||||||
|
|
|
@ -7,11 +7,10 @@ $(document).ready(() => {
|
||||||
const pathComponents = location.pathname.split('/');
|
const pathComponents = location.pathname.split('/');
|
||||||
// Strip admin/plugins
|
// Strip admin/plugins
|
||||||
const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`;
|
const baseURL = `${pathComponents.slice(0, pathComponents.length - 2).join('/')}/`;
|
||||||
const resource = `${baseURL.substring(1)}socket.io`;
|
|
||||||
|
|
||||||
// connect
|
// connect
|
||||||
const room = `${url}settings`;
|
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) => {
|
socket.on('settings', (settings) => {
|
||||||
/* Check whether the settings.json is authorized to be viewed */
|
/* Check whether the settings.json is authorized to be viewed */
|
||||||
|
|
|
@ -223,13 +223,10 @@ const handshake = () => {
|
||||||
const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port;
|
const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port;
|
||||||
// create the url
|
// create the url
|
||||||
const url = `${loc.protocol}//${loc.hostname}:${port}/`;
|
const url = `${loc.protocol}//${loc.hostname}:${port}/`;
|
||||||
// find out in which subfolder we are
|
|
||||||
const resource = `${exports.baseURL.substring(1)}socket.io`;
|
|
||||||
// connect
|
// connect
|
||||||
socket = pad.socket = io.connect(url, {
|
socket = pad.socket = io.connect(url, {
|
||||||
// Allow deployers to host Etherpad on a non-root path
|
// Allow deployers to host Etherpad on a non-root path
|
||||||
path: `${exports.baseURL}socket.io`,
|
path: `${exports.baseURL}socket.io`,
|
||||||
resource,
|
|
||||||
reconnectionAttempts: 5,
|
reconnectionAttempts: 5,
|
||||||
reconnection: true,
|
reconnection: true,
|
||||||
reconnectionDelay: 1000,
|
reconnectionDelay: 1000,
|
||||||
|
|
|
@ -56,11 +56,9 @@ const init = () => {
|
||||||
const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port;
|
const port = loc.port === '' ? (loc.protocol === 'https:' ? 443 : 80) : loc.port;
|
||||||
// create the url
|
// create the url
|
||||||
const url = `${loc.protocol}//${loc.hostname}:${port}/`;
|
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
|
// 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
|
// send the ready message once we're connected
|
||||||
socket.on('connect', () => {
|
socket.on('connect', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue