From 224487d9e8e13b69ee05b628ccb8ecda467bd7a1 Mon Sep 17 00:00:00 2001 From: Kartik Mehta Date: Sun, 3 Nov 2024 17:30:42 +0530 Subject: [PATCH] Fix route visualization in auth --- blog/2024-11-04-jwt-authentication-in-orion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/2024-11-04-jwt-authentication-in-orion.md b/blog/2024-11-04-jwt-authentication-in-orion.md index 21422e1..62c186b 100644 --- a/blog/2024-11-04-jwt-authentication-in-orion.md +++ b/blog/2024-11-04-jwt-authentication-in-orion.md @@ -245,7 +245,7 @@ class AuthMiddleware extends IMiddleware { handle(req, res, next) { // Check if route is protected, if not, skip authentication and it does not starts with /visualize/ - const routeStartsWithVisualize = req.originalUrl.startsWith('/visualize/'); + const routeStartsWithVisualize = req.originalUrl.startsWith('/visualize'); if (req.originalUrl === settings.GENERAL.API_PREFIX + '/login' || req.originalUrl === settings.GENERAL.API_PREFIX + '/signup' || routeStartsWithVisualize ) { return next(); }