diff --git a/src/web/acp.js b/src/web/acp.js index d12be30f..ff5b896f 100644 --- a/src/web/acp.js +++ b/src/web/acp.js @@ -29,9 +29,7 @@ function checkAdmin(cb) { */ function handleAcp(req, res, _user) { const ioServers = ioConfig.getSocketEndpoints(); - const preferredSecure = req.realProtocol === 'https'; - const chosenServer = ioServers.find((server) => server.secure === preferredSecure) || - ioServers[0]; + const chosenServer = ioServers[0]; if (!chosenServer) { res.status(500).text("No suitable socket.io address for ACP"); diff --git a/src/web/routes/channel.js b/src/web/routes/channel.js index 807aefde..89be413c 100644 --- a/src/web/routes/channel.js +++ b/src/web/routes/channel.js @@ -24,10 +24,7 @@ export default function initialize(app, ioConfig, chanPath, getBannedChannel) { if (endpoints.length === 0) { throw new HTTPError('No socket.io endpoints configured'); } - const preferredSecure = req.realProtocol === 'https'; - const chosenEndpoint = endpoints.find((endpoint) => endpoint.secure === preferredSecure) || - endpoints[0]; - const socketBaseURL = chosenEndpoint.url; + const socketBaseURL = endpoints[0].url; sendPug(res, 'channel', { channelName: req.params.channel,