feat: cookie-based auth, SSR dashboard, JS-optional login

This commit is contained in:
M1
2026-03-16 17:25:59 +04:00
parent 8e4cb84599
commit ef56b47b09
9 changed files with 253 additions and 163 deletions
+3 -2
View File
@@ -85,8 +85,9 @@ export const ingest = new Elysia()
})
// SSE: stream live pings — auth via Bearer header
.get("/monitors/:id/stream", async ({ params, headers, error }) => {
const key = headers["authorization"]?.replace("Bearer ", "").trim();
.get("/monitors/:id/stream", async ({ params, headers, cookie, error }) => {
const key = headers["authorization"]?.replace("Bearer ", "").trim()
?? cookie?.pingql_key?.value;
if (!key) return error(401, { error: "Unauthorized" });