1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-06-27 00:51:30 +02:00

Fix cloudflared cannot be stopped in No Auth mode due to password checking

This commit is contained in:
Louis Lam
2022-06-18 19:06:03 +08:00
parent d65abe5b8c
commit b97019eea8
3 changed files with 11 additions and 3 deletions

View File

@ -63,7 +63,10 @@ module.exports.cloudflaredSocketHandler = (socket) => {
socket.on(prefix + "stop", async (currentPassword, callback) => {
try {
checkLogin(socket);
await doubleCheckPassword(socket, currentPassword);
const disabledAuth = await setting("disableAuth");
if (!disabledAuth) {
await doubleCheckPassword(socket, currentPassword);
}
cloudflared.stop();
} catch (error) {
callback({