mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-14 11:55:10 +00:00
Add method to NO_AUTHORIZATION_ROUTES
This commit is contained in:
+2
-2
@@ -134,8 +134,8 @@ function apiRoutes(missingRoutes) {
|
||||
|
||||
if (
|
||||
!NO_AUTHORIZATION_ROUTES.some((x) => {
|
||||
if (typeof x === "string") return path.startsWith(x);
|
||||
return x.test(path);
|
||||
if (typeof x === "string") return (method.toUpperCase() + " " + path).startsWith(x);
|
||||
return x.test(method.toUpperCase() + " " + path);
|
||||
})
|
||||
) {
|
||||
obj.security = [{ bearer: [] }];
|
||||
|
||||
Reference in New Issue
Block a user