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