From 44fcb5800b3fed7fce0c1fd4ce67d6415114e58f Mon Sep 17 00:00:00 2001 From: ProgrammerIn-wonderland Date: Mon, 6 Oct 2025 13:45:18 -0400 Subject: [PATCH] fix: options.no_options_auth should be optional chained --- src/backend/src/middleware/configurable_auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/src/middleware/configurable_auth.js b/src/backend/src/middleware/configurable_auth.js index 58342ff1..f4237d62 100644 --- a/src/backend/src/middleware/configurable_auth.js +++ b/src/backend/src/middleware/configurable_auth.js @@ -40,7 +40,7 @@ const is_whoami = (req) => { // in endpoints that do not require authentication, but can // provide additional functionality if the user is authenticated. const configurable_auth = options => async (req, res, next) => { - if ( options.no_options_auth && req.method === 'OPTIONS' ) { + if ( options?.no_options_auth && req.method === 'OPTIONS' ) { return next(); }