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:
Richard Hansen 2020-12-10 13:49:22 -05:00
parent 7949219179
commit 7eb0f996c3
4 changed files with 3 additions and 10 deletions

View file

@ -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) {

View file

@ -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 */