mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 00:20:45 +00:00
fix: options.no_options_auth should be optional chained
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / api-test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / api-test (22.x) (push) Has been cancelled
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