From ad273e2474ebf4c7682382a877efe677a2442aa4 Mon Sep 17 00:00:00 2001 From: coding398 <55938439+codingMASTER398@users.noreply.github.com> Date: Sun, 8 Oct 2023 12:12:11 +1100 Subject: [PATCH] fix stuffs thank u coding398 --- package.json | 2 +- src/index.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d3bfb4a..584d434 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "repl-auth", - "version": "1.0.6", + "version": "1.0.7", "description": "Use Replit's Repl Auth in your project without hosting on Replit.", "type": "module", "main": "./dist/index.cjs", diff --git a/src/index.ts b/src/index.ts index 9baa7c2..1d6a26d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -68,6 +68,10 @@ export function express( }); } + if(!req.headers.cookie){ + return next(); + } + const cookies: { [key: string]: string } = Object.fromEntries( req.headers.cookie.split(';').map((x) => { const a = x.trim().split('=');