mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 19:06:34 +00:00
debug(ws): log admin debug WS auth failure details
This commit is contained in:
parent
31ba05b703
commit
5198a681eb
1 changed files with 7 additions and 1 deletions
|
|
@ -246,7 +246,13 @@ export class Plugin extends BSBService<InstanceType<typeof Config>, typeof Event
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!authed) throw new Error("unauthorized");
|
if (!authed) throw new Error("unauthorized");
|
||||||
} catch {
|
} catch (authErr) {
|
||||||
|
obs.log.warn("admin debug WS auth failed for kiosk {id}: {err} (cookie present: {hasCookie}, cookieName: {cn})", {
|
||||||
|
id: kioskId,
|
||||||
|
err: (authErr as Error).message,
|
||||||
|
hasCookie: cookieHeader.length > 0,
|
||||||
|
cn: cookieName,
|
||||||
|
});
|
||||||
socket.write("HTTP/1.1 401 Unauthorized\r\n\r\n");
|
socket.write("HTTP/1.1 401 Unauthorized\r\n\r\n");
|
||||||
socket.destroy();
|
socket.destroy();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue