From 53ee6eacb28399c03bba5a48eb07238bcf6438c0 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Tue, 30 Jul 2024 10:23:14 +0200 Subject: [PATCH] inner activator --- packages/api/src/controllers/auth.js | 2 ++ packages/web/src/utility/InnerActivator.svelte | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 packages/web/src/utility/InnerActivator.svelte diff --git a/packages/api/src/controllers/auth.js b/packages/api/src/controllers/auth.js index bb0d6068..6a2de408 100644 --- a/packages/api/src/controllers/auth.js +++ b/packages/api/src/controllers/auth.js @@ -23,6 +23,8 @@ function unauthorizedResponse(req, res, text) { function authMiddleware(req, res, next) { const SKIP_AUTH_PATHS = ['/config/get', '/auth/oauth-token', '/auth/login', '/stream']; + // console.log('********************* getAuthProvider()', getAuthProvider()); + if (!getAuthProvider().shouldAuthorizeApi()) { return next(); } diff --git a/packages/web/src/utility/InnerActivator.svelte b/packages/web/src/utility/InnerActivator.svelte new file mode 100644 index 00000000..924f4b51 --- /dev/null +++ b/packages/web/src/utility/InnerActivator.svelte @@ -0,0 +1,8 @@ +