From 68a4ba15225ac97d194f49b103d44557d2fb8522 Mon Sep 17 00:00:00 2001 From: Hector Romero Date: Tue, 25 Apr 2023 09:02:11 -0700 Subject: [PATCH] Do not lower case CSRF Secret key When retrieving the existing CSRF Secret as part of the `setup` function, do not call `toLowerCase` on the token key. Fixes #67 --- src/utils/get-secret.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/get-secret.ts b/src/utils/get-secret.ts index a18d43f..d184d15 100644 --- a/src/utils/get-secret.ts +++ b/src/utils/get-secret.ts @@ -2,7 +2,7 @@ import { getCookie } from "./get-cookie"; import { IncomingMessage } from "http"; const getSecret = (req: IncomingMessage, tokenKey: string): string => { - return getCookie(req, tokenKey.toLowerCase()); + return getCookie(req, tokenKey); }; export { getSecret };