Remove bad protoswitching from previous commit

This commit is contained in:
Speng Reb 2026-04-21 00:27:20 +02:00
parent 80cd107aa0
commit 6efb8902fa
2 changed files with 2 additions and 7 deletions

View file

@ -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");

View file

@ -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,