From 4f6575e0a358becfc663cee3cb32f1c9456252fc Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 21 Oct 2023 21:38:29 +0100 Subject: [PATCH] perf(lib/fastifysession): optimize split param (#214) --- lib/fastifySession.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fastifySession.js b/lib/fastifySession.js index 9ac70b8..fb45ab9 100644 --- a/lib/fastifySession.js +++ b/lib/fastifySession.js @@ -130,7 +130,7 @@ function fastifySession (fastify, options, next) { return function handleSession (request, reply, done) { request.session = {} - const url = request.raw.url.split('?')[0] + const url = request.raw.url.split('?', 1)[0] if (verifyPath(url, cookieOpts.path || '/') === false) { done() return