1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-24 08:32:23 +02:00
uptime-kuma/server/socket-handlers/cloudflared-socket-handler.js

20 lines
391 B
JavaScript
Raw Normal View History

2022-03-29 08:48:02 +02:00
const { checkLogin } = require("../util-server");
const prefix = "cloudflared_";
module.exports.cloudflaredSocketHandler = (socket) => {
socket.on(prefix + "start", async (callback) => {
try {
checkLogin(socket);
} catch (error) {
callback({
ok: false,
msg: error.message,
});
}
});
};