mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-04 04:00:27 -06:00
fix: options.no_options_auth should be optional chained
This commit is contained in:
committed by
Neal Shah
parent
a5fa16b7bb
commit
44fcb5800b
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user