fix: options.no_options_auth should be optional chained

This commit is contained in:
ProgrammerIn-wonderland
2025-10-06 13:45:18 -04:00
committed by Neal Shah
parent a5fa16b7bb
commit 44fcb5800b

View File

@@ -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();
}