From c79d9a14c13dce824545eace14fe4650949a6994 Mon Sep 17 00:00:00 2001 From: Ricardo Chu <92066360+kypexfly@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:23:02 -0500 Subject: [PATCH] fix session token --- pages/sessions/cookies/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/sessions/cookies/index.md b/pages/sessions/cookies/index.md index 8c883b9..61d9f5e 100644 --- a/pages/sessions/cookies/index.md +++ b/pages/sessions/cookies/index.md @@ -108,7 +108,7 @@ function handleRequest(request: HTTPRequest, response: HTTPResponse): void { // session validation const cookies = parseCookieHeader(request.headers.get("Cookie") ?? ""); const token = cookies.get("session"); - if (sessionId === null) { + if (token === null) { response.setStatusCode(401); return; }