From 74f20898a3f5b014124c6281b08de087ef6fa467 Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Sat, 24 Aug 2024 08:43:22 +0200 Subject: Add method to NO_AUTHORIZATION_ROUTES --- scripts/openapi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/openapi.js') diff --git a/scripts/openapi.js b/scripts/openapi.js index 62623800..e6c52a17 100644 --- a/scripts/openapi.js +++ b/scripts/openapi.js @@ -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: [] }]; -- cgit 1.5.1